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.

<strong>AMD</strong> <strong>64</strong>-<strong>Bit</strong> <strong>Technology</strong> 26568—Rev. 3.02—August 2002<br />

PSADBW<br />

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 128-bit memory location.<br />

Mnemonic Opcode Description<br />

PSADBW xmm1, xmm2/mem128 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 128-bit memory location and writes<br />

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

register.<br />

xmm1<br />

xmm2/mem128<br />

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

0 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-128.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 />

274 PSADBW

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

Saved successfully!

Ooh no, something went wrong!