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 />

PSUBUSW<br />

Packed Subtract Unsigned and Saturate Words<br />

Subtracts each packed 16-bit unsigned integer value in the second source operand<br />

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

writes the unsigned integer result of each subtraction in the corresponding word of<br />

the destination (first source). The first source/destination operand is an XMM register<br />

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

Mnemonic Opcode Description<br />

PSUBUSW xmm1, xmm2/mem128 66 0F D9 /r Subtracts packed 16-bit unsigned integer values in an XMM<br />

register or 128-bit memory location from packed 16-bit<br />

integer values in another XMM register and writes the result in<br />

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 />

. . . . . .<br />

. . . . . .<br />

subtract<br />

saturate<br />

subtract<br />

saturate<br />

psubusw-128.eps<br />

For each packed value in the destination, if the value is larger than the largest<br />

unsigned 16-bit integer, it is saturated to FFFFh, and if the value is smaller than the<br />

smallest unsigned 16-bit integer, it is saturated to 0000h.<br />

Related Instructions<br />

PSUBB, PSUBD, PSUBQ, PSUBSB, PSUBSW, PSUBUSB, PSUBW<br />

rFLAGS Affected<br />

None<br />

MXCSR Flags Affected<br />

320 PSUBUSW

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

Saved successfully!

Ooh no, something went wrong!