HADDPS
Usage: HADDPS dest,src Modifies flags: None
Add horizontally packed SP FP numbers from 'src' to 'dest' stores the result in 'dest'.
Packed Single-FP Horizontal Add
HADDPS xmm1,xmm2/mem128 ; F2 0F 7C /r [Pent4]
HADDPS adds the single-precision floating-point values in the first and second dwords of the 'dest' operand and stores the result in the first dword of the 'dest' operand. Adds single-precision floating-point values in the third and fourth dword of the 'dest' operand and stores the result in the second dword of the 'dest' operand. Adds single-precision floating-point values in the first and second dword of the 'src' operand and stores the result in the third dword of the 'dest' operand. Adds single-precision floating-point values in the third and fourth dword of the 'src' operand and stores the result in the fourth dword of the 'dest' operand.
xmm1[31-0] = xmm1[31-0] + xmm1[63-32];
xmm1[63-32] = xmm1[95-64] + xmm1[127-96];
xmm1[95-64] = xmm2/m128[31-0] + xmm2/m128[63-32];
xmm1[127-96] = xmm2/m128[95-64] + xmm2/m128[127-96]
EXAMPLE:
haddps xmm1 xmm2
.