4-24
ColdFire CF4e Core User’s Manual
For More Information On This Product,
Go to: www.freescale.com
FPU Programmer’s Model
occurs only when the destination is S- or D-precision format; overflows for other formats
are handled as operand errors. At the end of any operation that could potentially overflow,
the intermediate result is checked for underflow, rounded, and then checked for overflow
before it is stored to the destination. If overflow occurs, FPSR[OVFL,INEX] are set.
Even if the intermediate result is small enough to be represented as a double-precision
number, an overflow can occur if the magnitude of the intermediate result exceeds the range
of the selected rounding precision format. See Table 4-17.
4.3.13 Underflow (UNFL)
An underflow exception occurs when the intermediate result of an arithmetic instruction is
too small to be represented as a normalized number in a floating-point register or memory
using the selected rounding precision, that is, when the intermediate result exponent is less
than or equal to the minimum exponent value of the selected rounding precision. Underflow
can only occur when the destination format is single or double precision. When the
destination is byte, word, or longword, the conversion underflows to zero without causing
an underflow or an operand error. At the end of any operation that could underflow, the
intermediate result is checked for underflow, rounded, and checked for overflow before it
is stored in the destination. FPSR[UNFL] is set if underflow occurs. If the underflow
exception is disabled, FPSR[INEX] is also set.
Even if the intermediate result is large enough to be represented as a double-precision
number, an underflow can occur if the magnitude of the intermediate result is too small to
be represented in the selected rounding precision. Table 4-18 shows results when the
exception is enabled or disabled.
Table 4-17. OVFL Exception Enabled/Disabled Results
Condition
OVFL
Description
Exception
disabled
0
The values stored in the destination based on the rounding mode defined in FPCR[MODE].
RN Infinity, with the sign of the intermediate result.
RZ
Largest magnitude number, with the sign of the intermediate result.
RM For positive overflow, largest positive normalized number
For negative overflow, -
∞
.
RP
For positive overflow, +
∞
For negative overflow, largest negative normalized number.
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 OVFL handler can overwrite the default result.
F
Freescale Semiconductor, Inc.
n
.