
Chapter 4. Floating-Point Unit (FPU)
For More Information On This Product,
Go to: www.freescale.com
4-25
FPU Programmer’s Model
4.3.14 Divide-by-Zero (DZ)
Attempting to use a zero divisor for a divide instruction causes a divide-by-zero exception.
When a divide-by-zero is detected, FPSR[DZ] is set. Table 4-18 shows results when the
exception is enabled or disabled.
4.3.15 Inexact Result (INEX)
An INEX exception condition exists when the infinitely precise mantissa of a floating-point
intermediate result has more significant bits than can be represented exactly in the selected
rounding precision or in the destination format. If this condition occurs, FPSR[INEX] is set
and the infinitely-precise result is rounded according to Table 4-20.
Table 4-18. UNFL Exception Enabled/Disabled Results
Condition UNFL
Description
Exception
disabled
0
The stored result is defined below. The UNFL exception also sets FPSR[INEX] if the UNFL
exception is disabled.
RN Zero, with the sign of the intermediate result.
RZ
Zero, with the sign of the intermediate result.
RM For positive underflow, + 0
For negative underflow, smallest negative normalized number.
RP
For positive underflow, smallest positive normalized number
For negative underflow, - 0
Exception
enabled
1
The result written to the destination is the same as for the exception disabled case unless the
exception occurs on a FMOVE OUT, in which case the destination is unaffected. If desired, the
user UNFL handler can overwrite the default result. The UNFL exception does not set
FPSR[INEX] if the UNFL exception is enabled so the exception handler can set FPSR[INEX]
based on results it generates.
Table 4-19. DZ Exception Enabled/Disabled Results
Condition DZ
Description
Exception
disabled
0
The destination floating-point data register is written with infinity with the sign set to the exclusive
OR of the signs of the input operands.
Exception
enabled
1
The destination floating-point data register is written as in the exception is disabled case.
Table 4-20. Inexact Rounding Mode Values
Mode
Result
RN
The representable value nearest the infinitely-precise intermediate value is the result. If the two nearest
representable values are equally near, the one whose lsb is 0 (even) is the result. This is sometimes called
round-to-nearest-even.
RZ
The result is the value closest to and no greater in magnitude than the infinitely-precise intermediate result.
This is sometimes called chop-mode, because the effect is to clear bits to the right of the rounding point.
RM
The result is the value closest to and no greater than the infinitely-precise intermediate result (possibly -
∞
).
RP
The result is the value closest to and no less than the infinitely-precise intermediate result (possibly +
∞
).
F
Freescale Semiconductor, Inc.
n
.