3-568
INSTRUCTION SET REFERENCE
PSUBSB/PSUBSWPacked Subtract with Saturation (Continued)
Operation
IF instruction is PSUBSB
THEN
DEST(7..0)
<
SaturateToSignedByte(DEST(7..0) SRC (7..0));
DEST(15..8)
<
SaturateToSignedByte(DEST(15..8) SRC(15..8));
DEST(23..16)
<
SaturateToSignedByte(DEST(23..16) SRC(23..16));
DEST(31..24)
<
SaturateToSignedByte(DEST(31..24) SRC(31..24));
DEST(39..32)
<
SaturateToSignedByte(DEST(39..32) SRC(39..32));
DEST(47..40)
<
SaturateToSignedByte(DEST(47..40) SRC(47..40));
DEST(55..48)
<
SaturateToSignedByte(DEST(55..48) SRC(55..48));
DEST(63..56)
<
SaturateToSignedByte(DEST(63..56) SRC(63..56))
ELSE (* instruction is PSUBSW *)
DEST(15..0)
<
SaturateToSignedWord(DEST(15..0) SRC(15..0));
DEST(31..16)
<
SaturateToSignedWord(DEST(31..16) SRC(31..16));
DEST(47..32)
<
SaturateToSignedWord(DEST(47..32) SRC(47..32));
DEST(63..48)
<
SaturateToSignedWord(DEST(63..48) SRC(63..48));
FI;
Intel C/C++ Compiler Intrinsic Equivalents
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_psubsb(__m64 m1, __m64 m2)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_subs_pi8(__m64 m1, __m64 m2)
Subtract the eight signed 8-bit values in m2 from the eight signed 8-bit values in m1 and saturate.
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_psubsw(__m64 m1, __m64 m2)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_subs_pi16(__m64 m1, __m64 m2)
Subtract the four signed 16-bit values in m2 from the four signed 16-bit values in m1 and satu-
rate.
Flags Affected
None.