User Guide

166 128-Bit Media and Scientific Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
SHUFPD—Shuffle Packed Double-Precision Floating-Point
The SHUFPS instruction moves any two of the four single-precision floating-point values in the first
operand to the low-order quadword of the destination and moves any two of the four single-precision
floating-point values in the second operand to the high-order quadword of the destination. In each
case, the value of the destination is determined by a field in the immediate-byte operand.
Figure 4-34 shows the SHUFPS shuffle operation. SHUFPS is useful, for example, in color imaging
when computing alpha saturation of RGB values. In this case, SHUFPS can replicate an alpha value in
a register so that parallel comparisons with three RGB values can be performed.
Figure 4-34. SHUFPS Shuffle Operation
The SHUFPD instruction moves either of the two double-precision floating-point values in the first
operand to the low-order quadword of the destination and moves either of the two double-precision
floating-point values in the second operand to the high-order quadword of the destination.
4.6.5 Arithmetic
The floating-point vector-arithmetic instructions perform an arithmetic operation on two floating-
point operands.
Addition
ADDPS—Add Packed Single-Precision Floating-Point
ADDPD— Add Packed Double-Precision Floating-Point
ADDSS—Add Scalar Single-Precision Floating-Point
ADDSD—Add Scalar Double-Precision Floating-Point
513-160.eps
result
operand 1
127 0
127 0
operand 2
127 0
imm8
mux
mux