Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z

Vol. 2B 4-41
INSTRUCTION SET REFERENCE, N-Z
Operation
PADDSB instruction with 64-bit operands:
DEST[7:0] SaturateToSignedByte(DEST[7:0] + SRC (7:0]);
(* Repeat add operation for 2nd through 7th bytes *)
DEST[63:56] SaturateToSignedByte(DEST[63:56] + SRC[63:56] );
PADDSB instruction with 128-bit operands:
DEST[7:0] SaturateToSignedByte (DEST[7:0] + SRC[7:0]);
(* Repeat add operation for 2nd through 14th bytes *)
DEST[127:120] SaturateToSignedByte (DEST[111:120] + SRC[127:120]);
PADDSW instruction with 64-bit operands
DEST[15:0] SaturateToSignedWord(DEST[15:0] + SRC[15:0] );
(* Repeat add operation for 2nd and 7th words *)
DEST[63:48] SaturateToSignedWord(DEST[63:48] + SRC[63:48] );
PADDSW instruction with 128-bit operands
DEST[15:0] SaturateToSignedWord (DEST[15:0] + SRC[15:0]);
(* Repeat add operation for 2nd through 7th words *)
DEST[127:112] SaturateToSignedWord (DEST[127:112] + SRC[127:112]);
Intel C/C++ Compiler Intrinsic Equivalents
PADDSB __m64 _mm_adds_pi8(__m64 m1, __m64 m2)
PADDSB __m128i _mm_adds_epi8 ( __m128i a, __m128i b)
PADDSW __m64 _mm_adds_pi16(__m64 m1, __m64 m2)
PADDSW __m128i _mm_adds_epi16 ( __m128i a, __m128i b)
Flags Affected
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.
#UD If CR0.EM[bit 2] = 1.
128-bit operations will generate #UD only if CR4.OSFXSR[bit 9]
= 0. Execution of 128-bit instructions on a non-SSE2 capable
processor (one that is MMX technology capable) will result in the
instruction operating on the mm registers, not #UD.