4-20
ColdFire CF4e Core User’s Manual
For More Information On This Product,
Go to: www.freescale.com
FPU Programmer’s Model
Attempting to execute an FPU instruction with an undefined or unsupported value in the
6-bit effective address, the 3-bit source/destination specifier, or the 7-bit opmode generates
a line-F emulator exception, vector 11. See Table 4-23.
4.3.7 Floating-Point Arithmetic Exceptions
This section describes floating-point arithmetic exceptions; Table 4-11 lists these
exceptions in order of priority:
Most floating-point exceptions are taken when the next floating-point arithmetic instruction
is encountered (this is called a pre-instruction exception). Exceptions set during a
floating-point store to memory or to an integer register are taken immediately
(post-instruction exception).
Note that FMOVE is considered an arithmetic instruction because the result is rounded.
Only FMOVE with any destination other than a floating-point register (sometimes called
FMOVE OUT) can generate post-instruction exceptions. Post-instruction exceptions never
write the destination. After a post-instruction exception, processing continues with the next
instruction.
A floating-point arithmetic exception becomes pending when the result of a floating-point
instruction sets an FPSR[EXC] bit and the corresponding FPCR[ENABLE] bit is set. A
user write to the FPSR or FPCR that causes the setting of an exception bit in FPSR[EXC]
along with its corresponding exception enabled in FPCR, leaves the FPU in an
exception-pending state. The corresponding exception is taken at the start of the next
arithmetic instruction as a pre-instruction exception.
Executing a single instruction can generate multiple exceptions. When multiple exceptions
occur with exceptions enabled for more than one exception class, the highest priority
exception is reported and taken. It is up to the exception handler to check for multiple
exceptions. The following multiple exceptions are possible:
Table 4-11. Exception Priorities
Priority
Exception
1
Branch/set on unordered (BSUN)
2
Input Not-a-Number (INAN)
3
Input denormalized number (IDE)
4
Operand error (OPERR)
5
Overflow (OVFL)
6
Underflow (UNFL)
7
Divide-by-zero (DZ)
8
Inexact (INEX)
F
Freescale Semiconductor, Inc.
n
.