2-78
MPC7400 RISC Microprocessor Users Manual
AltiVec UISA Instructions
2.5.2.3 Vector Floating-Point Rounding and Conversion Instructions
All AltiVec oating-point arithmetic instructions use the IEEE default rounding mode
round-to-nearest. The AltiVec ISA does not provide the IEEE directed rounding modes.
The AltiVec ISA provides separate instructions for converting oating-point numbers to
integral oating-point values for all IEEE rounding modes as follows:
¥
¥
¥
¥
Round-to-nearest (
vrTn
) (round)
Round-toward-zero (
vrTz
) (truncate)
Round-toward-minus-inTnity (
vrTm
) (oor)
Round-toward-positive-inTnity (
vrTp
) (ceiling).
Floating-point conversions to integers (
vctuxs
,
vctsxs
) use round-toward-zero (truncate)
rounding. The oating-point rounding instructions are shown in Table 2-66.
2.5.2.4 Vector Floating-Point Compare Instructions
The oating-point compare instructions are summarized in Table 2-67.
Table 2-65. Vector Floating-Point Multiply-Add Instructions
Name
Mnemonic
Syntax
Vector Multiply-Add Floating-Point
vmaddfp
v
D
,v
A
,v
C
,v
B
Vector Negative Multiply-Subtract Floating-Point
vnmsubfp
v
D
,v
A
,v
C
,v
B
Table 2-66. Vector Floating-Point Rounding and Conversion Instructions
Name
Mnemonic
Syntax
Vector Round to Floating-Point Integer Nearest
vrTn
v
D
,v
B
Vector Round to Floating-Point Integer toward Zero
vrTz
v
D
,v
B
Vector Round to Floating-Point Integer toward Positive InTnity
vrTp
v
D
,v
B
Vector Round to Floating-Point Integer toward Minus InTnity
vrTm
v
D
,v
B
Vector Convert from Unsigned Fixed-Point Word
vcfux
v
D
,v
B,UIMM
Vector Convert from Signed Fixed-Point Word
vcfsx
v
D
,v
B,UIMM
Vector Convert to Unsigned Fixed-Point Word Saturate
vctuxs
v
D
,v
B,UIMM
Vector Convert to Signed Fixed-Point Word Saturate
vctsxs
v
D
,v
B,UIMM
Table 2-67. Vector Floating-Point Compare Instructions
Name
Mnemonic
Syntax
Vector Compare Greater Than Floating-Point [Record]
vcmpgtfp[.]
Rc
,v
D
,v
A
,v
B
Vector Compare Equal to Floating-Point [Record]
vcmpeqfp[.]
Rc
,v
D
,v
A
,v
B
Vector Compare Greater Than or Equal to Floating-Point [Record]
vcmpgeqfp[.]
Rc
,v
D
,v
A
,v
B
Vector Compare Bounds Floating-Point [Record]
vcmpbfp[.]
Rc
,v
D
,v
A
,v
B