09.01.2013 Views

AMD x86-64 Architecture Programmer's Manual, Volume 4, 128-Bit ...

AMD x86-64 Architecture Programmer's Manual, Volume 4, 128-Bit ...

AMD x86-64 Architecture Programmer's Manual, Volume 4, 128-Bit ...

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.05—September 2003 <strong>AMD</strong><strong>64</strong> Technology<br />

PSADBW Packed Sum of Absolute Differences of Bytes<br />

Into a Word<br />

Computes the absolute differences of eight corresponding packed 8-bit unsigned<br />

integers in the first and second source operands and writes the unsigned 16-bit integer<br />

result of the sum of the eight differences in a word in the destination (first source).<br />

The first source/destination operand is an XMM register and the second source<br />

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

Mnemonic Opcode Description<br />

PSADBW xmm1, xmm2/mem<strong>128</strong> 66 0F F6 /r Compute the sum of the absolute differences of two sets of<br />

packed 8-bit unsigned integer values in an XMM register and<br />

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

the 16-bit unsigned integer result in the destination XMM<br />

register.<br />

xmm1 xmm2/mem<strong>128</strong><br />

127 <strong>64</strong> 63<br />

0<br />

127 <strong>64</strong> 63<br />

0<br />

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

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

absolute<br />

difference<br />

absolute<br />

difference<br />

add 8<br />

pairs<br />

absolute<br />

difference<br />

absolute<br />

difference<br />

add 8<br />

pairs<br />

127 79 <strong>64</strong> 63 15 0<br />

0<br />

0<br />

psadbw-<strong>128</strong>.eps<br />

The sum of the differences of the eight bytes in the high-order quadwords of the<br />

source operands are written in the least-significant word of the high-order quadword<br />

in the destination XMM register, with the remaining bytes cleared to all 0s. The sum of<br />

PSADBW 275

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

Saved successfully!

Ooh no, something went wrong!