Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z
Vol. 2B 4-91
INSTRUCTION SET REFERENCE, N-Z
PMADDWD—Multiply and Add Packed Integers
Description
Multiplies the individual signed words of the destination operand (first operand) by
the corresponding signed words of the source operand (second operand), producing
temporary signed, doubleword results. The adjacent doubleword results are then
summed and stored in the destination operand. For example, the corresponding low-
order words (15-0) and (31-16) in the source and destination operands are multi-
plied by one another and the doubleword results are added together and stored in
the low doubleword of the destination register (31-0). The same operation is
performed on the other pairs of adjacent words. (Figure 4-2 shows this operation
when using 64-bit operands.) The source operand can be an MMX technology register
or a 64-bit memory location, or it can be an XMM register or a 128-bit memory loca-
tion. The destination operand can be an MMX technology register or an XMM register.
The PMADDWD instruction wraps around only in one situation: when the 2 pairs of
words being operated on in a group are all 8000H. In this case, the result wraps
around to 80000000H.
In 64-bit mode, using a REX prefix in the form of REX.R permits this instruction to
access additional registers (XMM8-XMM15).
Opcode Instruction
64-
Bit
Mode
Compat/
Leg Mode Description
0F F5 /r PMADDWD mm,
mm/m64
Valid Valid Multiply the packed words in mm
by the packed words in mm/m64,
add adjacent doubleword results,
and store in mm.
66 0F F5 /r PMADDWD xmm1,
xmm2/m128
Valid Valid Multiply the packed word integers
in xmm1 by the packed word
integers in xmm2/m128, add
adjacent doubleword results, and
store in xmm1.