Rev. 1.50, 10/04, page 101 of 448
6.2.2 Non-Numbers
(NaN)
Figure 6.3 shows the bit pattern of a non-number (NaN). A value is NaN in the following case:
•
Sign bit: Don't care
•
Exponent field: All bits are 1
•
Fraction field: At least one bit is 1
The NaN is a signaling NaN (sNaN) if the MSB of the fraction field is 1, and a quiet NaN (qNaN)
if the MSB is 0.
31 30
23 22
0
x
N = 1:sNaN
N = 0:qNaN
11111111
Nxxxxxxxxxxxxxxxxxxxxxx
Figure 6.3 Single-Precision NaN Bit Pattern
An sNaN is assumed to be the input data in an operation, except the transfer instructions between
registers, FABS, and FNEG, that generates a floating-point value.
•
When the EN.V bit in FPSCR is 0, the operation result (output) is a qNaN.
•
When the EN.V bit in FPSCR is 1, an invalid operation exception will be generated. In this
case, the contents of the operation destination register are unchanged.
Following three instructions are used as transfer instructions between registers.
•
FMOV FRm,FRn
•
FLDS FRm,FPUL
•
FSTS FPUL,FRn
If a qNaN is input in an operation that generates a floating-point value, and an sNaN has not been
input in that operation, the output will always be a qNaN irrespective of the setting of the EN.V bit
in FPSCR. An exception will not be generated in this case.
The qNAN values as operation results are as follows:
•
Single-precision qNaN: H'7FBF FFFF
•
Double-precision qNaN: H'7FF7 FFFF FFFF FFFF
See section 10, Instruction Descriptions for details of floating-point operations when a non-
number (NaN) is input.
Содержание SuperH SH-4A
Страница 2: ...Rev 1 50 10 04 page ii of xx ...
Страница 8: ...Rev 1 50 10 04 page viii of xx ...
Страница 116: ...Rev 1 50 10 04 page 96 of 448 ...
Страница 178: ...Rev 1 50 10 04 page 158 of 448 ...
Страница 206: ...Rev 1 50 10 04 page 186 of 448 ...
Страница 231: ...Rev 1 50 10 04 page 211 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 235: ...Rev 1 50 10 04 page 215 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 238: ...Rev 1 50 10 04 page 218 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 408: ...Rev 1 50 10 04 page 388 of 448 Possible Exceptions Inexact Not generated when FPSCR PR 1 ...
Страница 445: ...Rev 1 50 10 04 page 425 of 448 Possible Exceptions Invalid operation Overflow Underflow Inexact ...
Страница 446: ...Rev 1 50 10 04 page 426 of 448 ...
Страница 468: ...Rev 1 50 10 04 page 448 of 448 ...
Страница 471: ......
Страница 472: ...SH 4A Software Manual ...