
Chapter 2. Programming Model
2-77
AltiVec UISA Instructions
The AltiVec oating-point data format complies with the ANSI/IEEE-754 standard as
deTned for single precision. A quantity in this format represents a signed normalized
number, a signed denormalized number, a signed zero, a signed inTnity, a quiet not a
number (QNaN), or a signaling NaN (SNaN). Operations perform to a
Java/IEEE/C9X-compliant subset of the IEEE standard; for further details on the Java or
Non-Java mode see òJava Mode,ó in Chapter 3, òOperand Conventions,ó of
The AltiVec
Technology Programming Environments Manual
.
Section 7.1.3.2, òJava Mode, NaNs, Denormalized Numbers, and Zeros,ó describes how the
MPC7400 handles denormalization for AltiVec oating-point instructions.
The AltiVec ISA does not report IEEE exceptions but rather produces default results as
speciTed by the Java/IEEE/C9X Standard; for further details on exceptions see
òFloating-Point Exceptions,ó in Chapter 3, òOperand Conventions,ó of
The AltiVec
Technology Programming Environments Manual
.
2.5.2.1 Vector Floating-Point Arithmetic Instructions
The oating-point arithmetic instructions are summarized in Table 2-64.
2.5.2.2 Vector Floating-Point Multiply-Add Instructions
Vector multiply-add instructions are critically important to performance because a multiply
followed by a data dependent addition is the most common idiom in DSP algorithms. In
most implementations, oating-point multiply-add instructions perform with the same
latency as either a multiply or add alone, thus doubling performance in comparing to the
otherwise serial multiply and adds.
AltiVec oating-point multiply-add instructions fuse (a multiply-add fuse implies that the
full product participates in the add operation without rounding, only the Tnal result rounds).
This not only simpliTes the implementation and reduces latency (by eliminating the
intermediate rounding) but also increases the accuracy compared to separate multiply and
adds.
The oating-point multiply-add instructions are summarized in Table 2-65.
Table 2-64. Vector Floating-Point Arithmetic Instructions
Name
Mnemonic
Syntax
Vector Add Floating-Point
vaddfp
v
D
,v
A
,v
B
Vector Subtract Floating-Point
vsubfp
v
D
,v
A
,v
B
Vector Maximum Floating-Point
vmaxfp
v
D
,v
A
,v
B
Vector Minimum Floating-Point
vminfp
v
D
,v
A
,v
B