
MOTOROLA
Chapter 2. Programming Model
2-27
Implementation Note
—Single-precision multiply-type instructions operate faster than
their double-precision equivalents. See Chapter 6, “Instruction Timing,” for more
information.
2.3.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 2-16. (Floating-point instructions
are not supported on the EC603e microprocessor.)
2.3.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 2-17. (Floating-point instructions are not supported on the
EC603e microprocessor.)
2.3.4.2.5 Floating-Point Status and Control Register Instructions
Every FPSCR instruction appears to synchronize the effects of all floating-point
instructions executed by a given processor. Executing an FPSCR instruction ensures that all
floating-point instructions previously initiated by the given processor appear to have
completed before the FPSCR instruction is initiated and that no subsequent floating-point
instructions appear to be initiated by the given processor until the FPSCR instruction has
Table 2-16. Floating-Point Rounding and Conversion Instructions
Name
Mnemonic
Operand Syntax
Floating Round to Single-Precision
frsp (frsp.)
fr
D
,fr
B
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
Table 2-17. Floating-Point Compare Instructions
Name
Mnemonic
Operand Syntax
Floating Compare Unordered
fcmpu
crf
D
,fr
A
,fr
B
Floating Compare Ordered
fcmpo
crf
D
,fr
A
,fr
B