HADDPS—Packed Single-FP Horizontal Add
INSTRUCTION SET REFERENCE, A-L
3-430 Vol. 2A
See Figure 3-18 for HADDPS; see Figure 3-19 for VHADDPS.
Figure 3-19. VHADDPS operation
128-bit Legacy SSE version: The second source can be an XMM register or an 128-bit memory location. The desti-
nation is not distinct from the first source XMM register and the upper bits (VLMAX-1:128) of the corresponding
YMM register destination are unmodified.
VEX.128 encoded version: the first source operand is an XMM register or 128-bit memory location. The destination
operand is an XMM register. The upper bits (VLMAX-1:128) of the corresponding YMM register destination are
zeroed.
VEX.256 encoded version: The first source operand is a YMM register. The second source operand can be a YMM
register or a 256-bit memory location. The destination operand is a YMM register.
Figure 3-18. HADDPS—Packed Single-FP Horizontal Add
OM15994
HADDPS xmm1, xmm2/m128
RESULT:
xmm1
xmm2/
m128
xmm1[31:0] +
xmm1[63:32]
[31:0]
xmm1[95:64] +
xmm1[127:96]
[63:32]
[63:32]
[31:0]
xmm1
[31:0]
[63:32]
xmm2/m128
[31:0] + xmm2/
m128[63:32]
[95:64]
xmm2/m128
[95:64] + xmm2/
m128[127:96]
[127:96]
[127:96]
[95:64]
[95:64]
[127:96]
Y6+Y7
X6+X7
Y2+Y3
X2+X3
DEST
SRC1
X0
SRC2
X1
X2
X3
X4
X5
X6
X7
Y0
Y1
Y2
Y3
Y4
Y5
Y6
Y7
X0+X1
Y4+Y5
X4+X5
Y0+Y1