Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z
Vol. 2B 4-199
INSTRUCTION SET REFERENCE, N-Z
Operation
PSUBUSB instruction with 64-bit operands:
DEST[7:0] ← SaturateToUnsignedByte (DEST[7:0]
− SRC (7:0] );
(* Repeat add operation for 2nd through 7th bytes *)
DEST[63:56] ← SaturateToUnsignedByte (DEST[63:56]
− SRC[63:56];
PSUBUSB instruction with 128-bit operands:
DEST[7:0] ← SaturateToUnsignedByte (DEST[7:0]
− SRC[7:0]);
(* Repeat add operation for 2nd through 14th bytes *)
DEST[127:120] ← SaturateToUnSignedByte (DEST[127:120]
− SRC[127:120]);
PSUBUSW instruction with 64-bit operands:
DEST[15:0] ← SaturateToUnsignedWord (DEST[15:0] − SRC[15:0] );
(* Repeat add operation for 2nd and 3rd words *)
DEST[63:48] ← SaturateToUnsignedWord (DEST[63:48]
− SRC[63:48] );
PSUBUSW instruction with 128-bit operands:
DEST[15:0] ← SaturateToUnsignedWord (DEST[15:0]
− SRC[15:0]);
(* Repeat add operation for 2nd through 7th words *)
DEST[127:112] ← SaturateToUnSignedWord (DEST[127:112]
− SRC[127:112]);
Intel C/C++ Compiler Intrinsic Equivalents
PSUBUSB __m64 _mm_subs_pu8(__m64 m1, __m64 m2)
PSUBUSB __m128i _mm_subs_epu8(__m128i m1, __m128i m2)
PSUBUSW __m64 _mm_subs_pu16(__m64 m1, __m64 m2)
PSUBUSW __m128i _mm_subs_epu16(__m128i m1, __m128i m2)
Flags Affected
None.
Numeric Exceptions
None.
Protected Mode Exceptions
#GP(0) If a memory operand effective address is outside the CS, DS,
ES, FS, or GS segment limit.
(128-bit operations only) If a memory operand is not aligned on
a 16-byte boundary, regardless of segment.
#SS(0) If a memory operand effective address is outside the SS
segment limit.