
Chapter 4. Floating-Point Unit (FPU)
For More Information On This Product,
Go to: www.freescale.com
4-15
FPU Programmer’s Model
intermediate value and still representable in the selected precision. The tie case in
Table 4-6 shows how the 56-bit mantissa allows the FPU to meet the error bound of the
IEEE specification.
The lsb of the rounded result does not increment even though the guard bit is set in the
intermediate result. The IEEE-754 standard specifies this way of handling ties. If the
destination data format is double-precision and there is a difference between the infinitely
precise intermediate result and the round-to-nearest result, the relative difference is 2
–53
(the value of the guard bit). This error is equal to half of the lsb’s value and is the worst
case error that can be introduced with RN mode. Thus, the term one-half unit in the last
place correctly identifies the error bound for this operation. This error specification is the
relative error present in the result; the absolute error bound is equal to 2
exponent
x 2
–53
.
Table 4-7 shows the error bound for other rounding modes.
The difference between the infinitely precise result and the rounded result is 2
–53
+ 2
–54
+
2
–55
, which is slightly less than 2
–52
(the value of the lsb). Thus, the error bound for this
operation is not more than one unit in the last place. The FPU meets these error bounds for
all arithmetic operations, providing accurate, repeatable results.
4.3.5 Floating-Point Post Processing
Most operations end with post-processing, for which the FPU provides two steps. First,
FPSR[FPCC] bits are set or cleared at the end of each arithmetic or move operation to a
single floating-point data register. FPCC bits are consistently set based on the result of the
operation. Second, the FPU supports 32 conditional tests that allow floating-point
conditional instructions to test floating-point conditions in the same way that integer
conditional instructions test the integer condition code. The combination of consistently
set FPCC bits and the simple programming of conditional instructions gives the processor
a very flexible, efficient way to change program flow based on floating-point results. When
the summary for each instruction is read, it should be assumed that an instruction performs
post processing unless the summary specifically states otherwise. The following
paragraphs describe post processing in detail.
Table 4-6. Tie-Case Example
Result
Integer
52-Bit Fraction
Guard
Round
Sticky
Intermediate
x
xxx…x00
1
0
0
Rounded-to-Nearest
x
xxx…x00
0
0
0
Table 4-7. Round Mode Error Bounds
Result
Integer
52-Bit Fraction
Guard
Round
Sticky
Intermediate
x
xxx…x00
1
1
1
Rounded-to-Zero
x
xxx…x00
0
0
0
F
Freescale Semiconductor, Inc.
n
.