
MOTOROLA
3-16
OPERAND CONVENTIONS
For More Information On This Product,
Go to: www.freescale.com
RCPU
REFERENCE MANUAL
metic operations on infinities or on NaNs, when the invalid operation exception is
disabled (FPSCR[VE] = 0). Quiet NaNs propagate through all operations, except
ordered comparison, floating round to single precision, and conversion to integer
operations. Quiet NaNs do not signal exceptions, except during ordered compari-
son and conversion to integer operations. Specific encodings in QNaNs can thus
be preserved through a sequence of operations and used to convey diagnostic in-
formation to help identify results from invalid operations.
When a QNaN results from an operation because an operand is a NaN or because
a QNaN is generated due to a disabled invalid operation exception, the following
rule is applied to determine the QNaN with the high-order fraction bit set to one that
is to be stored as the result:
If (
fr
A) is a NaN
Then
fr
D
←
(
fr
A)
Else if (
fr
B) is a NaN
Then
fr
D
←
(
fr
B)
Else if (
fr
C) is a NaN
Then
fr
D
←
(
fr
C)
Else if generated QNaN
Then
fr
D
←
generated QNaN
If the operand specified by
fr
A is a NaN, that NaN is stored as the result. Otherwise,
if the operand specified by
fr
B is a NaN (if the instruction specifies an
fr
B operand),
that NaN is stored as the result. Otherwise, if the operand specified by
fr
C is a NaN
(if the instruction specifies an
fr
C operand), that NaN is stored as the result. Oth-
erwise, if a QNaN is generated by a disabled invalid operation exception, that
QNaN is stored as the result. If a QNaN is to be generated as a result, the QNaN
generated has a sign bit of zero, an exponent field of all ones, and a high-order
fraction bit of one with all other fraction bits zero. An instruction that generates a
QNaN as the result of a disabled invalid operation generates this QNaN. This is
shown in
Figure 3-19
.
Figure 3-19 Representation of QNaN
3.3.8 Sign of Result
The following rules govern the sign of the result of an arithmetic operation, when
the operation does not yield an exception. These rules apply even when the oper-
ands or results are ±0 or ±×.
The sign of the result of an addition operation is the sign of the source operand hav-
ing the larger absolute value. The sign of the result of the subtraction operation, x
– y, is the same as the sign of the result of the addition operation, x+(–y).
SIGN OF MANTISSA, NaN OR 1
111...1
1000....0
0
F
Freescale Semiconductor, Inc.
n
.