3-489
INSTRUCTION SET REFERENCE
PAVGB/PAVGWPacked Average
Description
The PAVG instructions add the unsigned data elements of the source operand to the unsigned
data elements of the destination register, along with a carry-in. The results of the add are then
each independently right-shifted by one bit position. The high order bits of each element are
filled with the carry bits of the corresponding sum.
The destination operand is an MMX technology register. The source operand can either be an
MMX technology register or a 64-bit memory operand.
The PAVGB instruction operates on packed unsigned bytes, and the PAVGW instruction oper-
ates on packed unsigned words.
Figure 3-60. Operation of the PAVGB/PAVGW Instruction
OpcodeInstruction
Description
0F,E0, /rPAVGB mm1,mm2/m64
Average with rounding packed unsigned bytes from
MM2/Mem to packed bytes in MM1 register.
0F,E3, /rPAVGW mm1, mm2/m64Average with rounding packed unsigned words from
MM2/Mem to packed words in MM1 register.
255
PAVGB mm1,mm2/m64
0
1
2532542551
0
255
0
1
255255255
1
0
255
0
2
254255255
2
0
=
=
=
=
=
=
=
=
mm1
mm1
mm2/
64