
MOTOROLA
Chapter 3. Instruction Set Model
3-17
Instruction Set Summary
Implementation Note
—Single-precision multiply-type instructions operate faster than
their double-precision equivalents. See Chapter 7, “Instruction Timing,” for more
information.
3.2.4.2.3
Floating-Point Rounding and Conversion Instructions
The Floating Round to Single-Precision (
frsp
) instruction is used to truncate a 64-bit
double-precision number to a 32-bit single-precision floating-point number. The
floating-point conversion instructions convert a 64-bit double-precision floating-point
number to a 32-bit signed integer number.
The PowerPC architecture defines bits 0–31 of floating-point register
fr
D as undefined
when executing the Floating Convert to Integer Word (
fctiw
) and Floating Convert to
Integer Word with Round Toward Zero (
fctiwz
) instructions.
Examples of uses of these instructions to perform various conversions can be found in
Appendix D, “Floating-Point Models,” in the
Programming Environments Manual
. The
floating-point rounding instructions are shown in Table 3-10.
3.2.4.2.4
Floating-Point Compare Instructions
Floating-point compare instructions compare the contents of two floating-point registers.
The comparison ignores the sign of zero (that is +0 = –0). The floating-point compare
instructions are listed in Table 3-11.
Floating Negative Multiply-Add
(Double-Precision)
fnmadd
(
fnmadd.
)
fr
D
,fr
A
,fr
C
,fr
B
Floating Negative Multiply-Add Single
fnmadds
(
fnmadds.
)
fr
D
,fr
A
,fr
C
,fr
B
Floating Negative Multiply-Subtract
(Double-Precision)
fnmsub
(
fnmsub.
)
fr
D
,fr
A
,fr
C
,fr
B
Floating Negative Multiply-Subtract Single
fnmsubs
(
fnmsubs.
)
fr
D
,fr
A
,fr
C
,fr
B
Table 3-10. Floating-Point Rounding and Conversion Instructions
Name
Mnemonic
Operand Syntax
Floating Convert to Integer Word
fctiw
(
fctiw.
)
fr
D
,fr
B
Floating Convert to Integer Word with Round
Toward Zero
fctiwz
(
fctiwz.
)
fr
D
,fr
B
Floating Round to Single-Precision
frsp
(
frsp.
)
fr
D
,fr
B
Table 3-9. Floating-Point Multiply-Add Instructions (continued)
Name
Mnemonic
Operand Syntax
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.