
4-10
ColdFire CF4e Core User’s Manual
For More Information On This Product,
Go to: www.freescale.com
FPU Programmer’s Model
For AEXC[OVFL], AEXC[DZ], and AEXC[INEX], the next value is determined by
ORing the current AEXC value with the EXC equivalent, as shown in the following:
Next AEXC[OVFL] = Current AEXC[OVFL] | EXC[OVFL]
Next AEXC[DZ] = Current AEXC[DZ] | EXC[DZ]
Next AEXC[INEX] = Current AEXC[INEX] | EXC[INEX]
For AEXC[IOP] and AEXC[UNFL], the next value is calculated by ORing the current
AEXC value with EXC bit combinations, as follows:
15–8
EXC
Exception status byte. Contains a bit for each floating-point exception that might have occurred
during the most recent arithmetic instruction or move operation. This byte is cleared at the start of
all operations that generate floating-point exceptions (except FBcc only affects BSUN and that
only for nonaware tests). Operations that do not generate floating-point exceptions do not clear
this byte. An exception handler can use this byte to determine which floating-point exception or
exceptions caused a trap. The equations below the table show the comparative relationship
between the EXC byte and AEXC byte.
15
BSUN
Branch/set on unordered
14
INAN
Input not-a-number
13
OPERR
Operand error
12
OVFL
Overflow
11
UNFL
Underflow
10
DZ
Divide by zero
9
INEX
Inexact result
8
IDE
Input is denormalized
7–0
AEXC
Accrued exception byte. Contains 5 required bits for IEEE-754 exception-disabled operations.
These exceptions are logical combinations of EXC bits. AEXC records all floating-point
exceptions since AEXC was last cleared, either by writing to FPSR or as a result of reset or a
restore operation of the null state.
Many users disable traps for some or all floating-point exception classes. AEXC eliminates the
need to poll EXC after each floating-point instruction. At the end of arithmetic operations, EXC
bits are logically combined to form an AEXC value that is logically ORed into the existing AEXC
byte (FBcc only updates IOP). This operation creates sticky floating-point exception bits in AEXC
that the user can poll only at the end of a series of floating-point operations. A sticky bit is one that
remains set until the user clears it.
Setting or clearing AEXC bits neither causes nor prevents an exception. The equations below the
table show relationships between EXC and AEXC. Comparing the current value of an AEXC bit
with a combination of EXC bits derives a new value in the corresponding AEXC bit. These
boolean equations apply to setting AEXC bits at the end of each operation affecting AEXC.
7
IOP
Invalid operation
6
OVFL
Overflow
5
UNFL
Underflow
4
DZ
Divide by zero
3
INEX
Inexact result
2–0
—
Reserved, should be cleared.
Table 4-5. FPSR Field Descriptions (Continued)
Bits
Field
Description
F
Freescale Semiconductor, Inc.
n
.