reset or a restore operation of the null state sets FP7–FP0 to positive, nonsignaling not-a-
numbers (NANs).
9.2.2 Floating-Point Control Register (FPCR)
The FPCR (see Figure 9-2) contains an exception enable (ENABLE) byte that enables or
disables traps for each class of floating-point exceptions and a mode control (MODE) byte
that sets the user-selectable modes. The user can read or write to the FPCR. Motorola
reserves bits 31–16 for future definition; these bits are always read as zero and are
ignored during write operations. The reset function or a restore operation of the null state
clears the FPCR. When cleared, this register provides the IEEE 754 standard defaults. EXCEPTION ENABLE BYTE. Each bit of the ENABLE byte (see Figure 9-2)
corresponds to a floating-point exception class. The user can separately enable traps for
each class of floating-point exceptions. MODE CONTROL BYTE. The MODE byte (see Figure 9-2) controls the user-
selectable rounding modes and precisions. Zeros in this byte select the IEEE 754
standard defaults. The rounding mode (RND) specifies how inexact results are rounded,
and the rounding precision (PREC) selects the boundary for rounding the mantissa.
The processor supports four rounding modes specified by the IEEE 754 standard. These
modes are: round to nearest (RN), round toward zero (RZ), round toward plus infinity
(RP), and round toward minus infinity (RM). The RP and RM modes are directed rounding
modes that are useful in interval arithmetic. Rounding is accomplished through the
intermediate result. Single-precision results are rounded to a 24-bit boundary; double-
precision results are rounded to a 53-bit boundary; and extended-precision results are
rounded to a 64-bit boundary. Table 9-1 lists the encodings for the FPCR.
Table 9-1. Floating-Point Control Register Encodings
Rounding Mode
(RND Field) Encoding Rounding Precision
(PREC Field)
To Nearest (RN) 0 0 Extend (X)
Toward Zero (RZ) 0 1 Single (S)
Toward Minus Infinity (RM) 1 0 Double (D)
Toward Plus Infinity (RP) 1 1 Undefined
Terms of Use | Privacy Policy | DMCA Policy
2006-2020 Rsmanuals.com