Chapter 4. Floating-Point Unit (FPU)
For More Information On This Product,
Go to: www.freescale.com
4-23
FPU Programmer’s Model
4.3.11 Operand Error (OPERR)
The operand error exception encompasses problems arising in a variety of operations,
including errors too infrequent or trivial to merit a specific exceptional condition. Basically,
an operand error occurs when an operation has no mathematical interpretation for the given
operands. Table 4-15 lists possible operand errors. When one occurs, FPSR[OPERR] is set.
Table 4-16 describes results when the exception is enabled and disabled.
4.3.12 Overflow (OVFL)
An overflow exception is detected for arithmetic operations in which the destination is a
floating-point data register or memory when the intermediate result’s exponent is greater
than or equal to the maximum exponent value of the selected rounding precision. Overflow
Table 4-14. IDE Exception Enabled/Disabled Results
Condition
IDE
Description
Exception
disabled
0
Any denormalized operand is treated as zero, FPSR[INEX] is set, and the operation proceeds.
Exception
enabled
1
The result written to the destination is the same as the exception disabled case unless the
exception occurs on a FMOVE OUT, in which case the destination is unaffected. FPSR[INEX] is
not set to allow the handler to set it appropriately.
Table 4-15. Possible Operand Errors
Instruction
Condition Causing Operand Error
FADD
[(+
∞
) + (-
∞
)] or [(-
∞
) + (+
∞
)]
FDIV
(0 ÷ 0) or (
∞
÷
∞
)
FMOVE OUT (to B, W, or L)
Integer overflow, source is NAN or ±
∞
FMUL
One operand is 0 and the other is ±
∞
FSQRT
Source is < 0 or -
∞
FSUB
[(+
∞
) - (+
∞
)] or [(-
∞
) - (-
∞
)]
Table 4-16. OPERR Exception Enabled/Disabled Results
Condition
OPERR
Description
Exception
disabled
0
When the destination is a floating-point data register, the result is a double-precision NAN,
with its mantissa set to all ones and the sign set to zero (positive).
For a FMOVE OUT instruction with the format S or D, an OPERR exception is impossible. With
the format B, W, or L, an OPERR exception is possible only on a conversion to integer
overflow, or if the source is either an infinity or a NAN. On integer overflow and infinity source
cases, the largest positive or negative integer that can fit in the specified destination size (B,
W, or L) is stored. In the NAN source case, a constant of all ones is 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 OPERR handler can overwrite the default result.
F
Freescale Semiconductor, Inc.
n
.