Floating-Point Exceptions
MCF548x Reference Manual, Rev. 3
Freescale Semiconductor 6-23

6.6.1.8 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 6-20.
FPSR[INEX] is also set for any of the following conditions:
If an input operand is a denormalized number and the IDE exception is disabled
An overflowed result
An underflowed result with the underflow exception disabled
Table 6-18 shows results when the exception is enabled or disabled.

6.6.2 Floating-Point State Frames

Floating-point arithmetic exception handlers should have FSAVE as the first floating-point instruction;
otherwise, encountering another floating-point arithmetic instruction will cause the exception to be
reported again. After FSAVE executes, the handler should use FMOVEM to access floating-point data
registers, because it cannot generate further exceptions or change the FPSR.
Table 6-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 6-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 +×).
Table 6-21. INEX Exception Enabled/Disabled Results
Condition INEX Description
Exception
disabled
0 The result is rounded and then written to the destination.
Exception
enabled
1 The result written to the destination is the same as for the exception disabled case unless
the exception occurred on a FMOVE OUT, in which case the destination is unaffected. If
desired, the user INEX handler can overwrite the default result.