25.02.2015 Views

AMD 64-Bit Technology - ECE User Home Pages

AMD 64-Bit Technology - ECE User Home Pages

AMD 64-Bit Technology - ECE User Home Pages

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

26568—Rev. 3.02—August 2002<br />

<strong>AMD</strong> <strong>64</strong>-<strong>Bit</strong> <strong>Technology</strong><br />

PAVGB<br />

Packed Average Unsigned Bytes<br />

Computes the rounded average of each packed unsigned 8-bit integer value in the first<br />

source operand and the corresponding packed 8-bit unsigned integer in the second<br />

source operand and writes each average in the corresponding byte of the destination<br />

(first source). The average is computed by adding each pair of operands, adding 1 to<br />

the 9-bit temporary sum, and then right-shifting the temporary sum by one bit<br />

position. The destination and source operands are an XMM register and another XMM<br />

register or 128-bit memory location.<br />

Mnemonic Opcode Description<br />

PAVGB xmm1, xmm2/mem128 66 0F E0 /r Averages packed 8-bit unsigned integer values in an XMM<br />

register and another XMM register or 128-bit memory location<br />

and writes the result in the destination XMM register.<br />

xmm1<br />

xmm2/mem128<br />

. . . . . . . . . . . . . .<br />

127 0 127 0<br />

. . . . . . . . . . . . . .<br />

average<br />

average<br />

. . . . . . . . . . . . . .<br />

pavgb-128.eps<br />

Related Instructions<br />

PAVGW<br />

rFLAGS Affected<br />

None<br />

MXCSR Flags Affected<br />

None<br />

PAVGB 231

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!