![](http://datasheet.mmic.net.cn/230000/V4ECFUM_datasheet_15625205/V4ECFUM_75.png)
Chapter 4. Floating-Point Unit (FPU)
For More Information On This Product,
Go to: www.freescale.com
4-11
FPU Programmer’s Model
Next AEXC[IOP] = Current AEXC[IOP] | EXC[BSUN | INAN | OPERR]
Next AEXC[UNFL] = Current AEXC[UNFL] | EXC[UNFL
&
INEX]
4.3.3 Floating-Point Instruction Address Register (FPIAR)
The ColdFire OEP can execute integer and floating-point instructions simultaneously. As a
result, the PC value stacked by the processor in response to a floating-point exception trap
may not point to the instruction that caused the exception.
For FPU instructions that can generate exception traps, the 32-bit FPIAR is loaded with
the instruction PC address before the FPU begins execution. In case of an FPU exception,
the trap handler can use the FPIAR contents to determine the instruction that generated the
exception. FMOVE to/from FPCR, FPSR, or FPIAR and FMOVEM instructions cannot
generate floating-point exceptions and so do not modify FPIAR. A reset or a null-restore
operation clears FPIAR.
4.3.4 Floating-Point Computational Accuracy
The FPU performs all floating-point internal operations in double-precision. It supports
mixed-mode arithmetic by converting single-precision operands to double-precision
values before performing the specified operation. The FPU converts all memory data
formats to the double-precision data format and stores the value in a floating-point register
or uses it as the source operand for an arithmetic operation. When moving a
double-precision floating-point value from a floating-point data register, the FPU can
convert the data depending on the destination, as follows:
Valid data formats for memory destination: B, W, L, S, or D
Valid data formats for integer data register destinations: B, W, L, or S
Normally if the input operand is a denormalized number, the number must be normalized
before an FPU instruction can be executed. A denormalized input operand is converted to
zero if the input denorm exception (IDE) is disabled. If IDE is enabled, the floating-point
engine traps to allow software action to be taken by the handler.
4.3.4.1 Intermediate Result
All FPU calculations use an intermediate result. When the FPU performs any operation,
the calculation is carried out using double-precision inputs, and the intermediate result is
calculated as if to produce infinite precision. After the calculation is complete, any
necessary rounding of the intermediate result for the selected precision is performed and
the result and stored in the destination.
Figure 4-11 shows the intermediate result format. The intermediate result’s exponent for
some dyadic operations (for example, multiply and divide) can easily overflow or
underflow the 11-bit exponent of the designation floating-point register. To simplify
overflow and underflow detection, intermediate results in the FPU maintain a 12-bit two’s
F
Freescale Semiconductor, Inc.
n
.