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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

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

PAVGW<br />

Packed Average Unsigned Words<br />

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

first source operand and the corresponding packed 16-bit unsigned integer in the<br />

second source operand and writes each average in the corresponding word of the<br />

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

adding 1 to the 17-bit temporary sum, and then right-shifting the temporary sum by<br />

one bit position. The first source/destination operand is an XMM register and the<br />

second source operand is another XMM register or 128-bit memory location.<br />

Mnemonic Opcode Description<br />

PAVGW xmm1, xmm2/mem128 66 0F E3 /r Averages packed 16-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 />

. . . . . .<br />

127 112 111 96 95 80 79 <strong>64</strong> 63 48 47 32 31 16 15 0<br />

xmm2/mem128<br />

127 112 111 96 95 80 79 <strong>64</strong> 63 48 47 32 31 16 15 0<br />

average<br />

. . . . . .<br />

average<br />

. . . . . .<br />

pavgw-128.eps<br />

Related Instructions<br />

PAVGB<br />

rFLAGS Affected<br />

None<br />

MXCSR Flags Affected<br />

None<br />

PAVGW 233

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

Saved successfully!

Ooh no, something went wrong!