3-475
INSTRUCTION SET REFERENCE
PADDB/PADDW/PADDDPacked Add
Description
These instructions add the individual data elements (bytes, words, or doublewords) of the source
operand (second operand) to the individual data elements of the destination operand (first
operand) (refer to Figure 3-55). If the result of an individual addition exceeds the range for the
specified data type (overflows), the result is wrapped around, meaning that the result is truncated
so that only the lower (least significant) bits of the result are returned (that is, the carry is
ignored).
The destination operand must be an MMX technology register; the source operand can be
either an MMX technology register or a quadword memory location.
The PADDB instruction adds the bytes of the source operand to the bytes of the destination
operand and stores the results to the destination operand. When an individual result is too large
to be represented in eight bits, the lower eight bits of the result are written to the destination
operand and therefore the result wraps around.
The PADDW instruction adds the words of the source operand to the words of the destination
operand and stores the results to the destination operand. When an individual result is too large
to be represented in 16 bits, the lower 16 bits of the result are written to the destination operand
and therefore the result wraps around.
Opcode
Instruction
Description
0F FC /r
PADDB mm,
mm/m64
Add packed bytes from mm/m64 to packed bytes in mm.
0F FD /r
PADDW mm,
mm/m64
Add packed words from mm/m64 to packed words in
mm.
0F FE /r
PADDD mm,
mm/m64
Add packed doublewords from mm/m64 to packed
doublewords in mm.
Figure 3-55. Operation of the PADDW Instruction
PADDW mm, mm/m64
mm
mm/m64
mm
10000000000000000111111100111000
+
+
+
+
11111111111111110001011100000111
01111111111111111001011000111111
3006015