![](http://datasheet.mmic.net.cn/230000/V4ECFUM_datasheet_15625205/V4ECFUM_90.png)
4-26
ColdFire CF4e Core User’s Manual
For More Information On This Product,
Go to: www.freescale.com
FPU Programmer’s Model
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 4-18 shows results when the exception is enabled or disabled.
4.3.16 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.
Note that if no intervention is needed, instead of FSAVE, the handler can simply clear the
appropriate FPCR and FPSR bits and then return from the exception.
Because the FPCR and FPSR are written in the FSAVE frame, a context switch needs only
execute FSAVE and FMOVEM for data registers. The new process needs to load data
registers by using a FMOVEM/FRESTORE sequence, then it can continue.
FSAVE operations always write a 4-longword floating-point state frame that holds a 64-bit
exception operand. Figure 4-13 shows FSAVE frame contents.
Figure 4-13. Floating-Point State Frame Contents
Table 4-22 describes format word fields.
Table 4-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.
31
24 23
19 18
16
15
0
Format word
Control Register (FPCR)
Frame Format
0000_0
Vector
Exception operand upper 32 bits
Exception operand lower 32 bits
Status register (FPSR)
F
Freescale Semiconductor, Inc.
n
.