Arithmetic Operations (Integer SSE2 Intrinsics)
Microsoft Specific
The operations are listed in the following table, followed by their descriptions. The packed arithmetic intrinsics for the 64-bit integer MMX technology are listed in the Packed Arithmetic Operations table.
SSE2 intrinsics use the __m128, __m128i, and __m128d data types, which are not supported on Itanium Processor Family (IPF) processors. Any SSE2 intrinsics that use the __m64 data type are not supported on x64 processors.
The emmintrin.h header file contains the declarations for the SSE2 instructions intrinsics.
Integer Arithmetic Operations
Intrinsic |
Instruction |
Operation |
---|---|---|
PADDB |
Addition |
|
PADDW |
Addition |
|
PADDD |
Addition |
|
PADDQ |
Addition |
|
PADDQ |
Addition |
|
PADDSB |
Addition |
|
PADDSW |
Addition |
|
PADDUSB |
Addition |
|
PADDUSW |
Addition |
|
PAVGB |
Computes average |
|
PAVGW |
Computes average |
|
PMADDWD |
Multiplication/addition |
|
PMAXSW |
Computes maxima |
|
PMAXUB |
Computes maxima |
|
PMINSW |
Computes minima |
|
PMINUB |
Computes minima |
|
PMULHW |
Multiplication |
|
PMULHUW |
Multiplication |
|
PMULLW |
Multiplication |
|
PMULUDQ |
Multiplication |
|
PMULUDQ |
Multiplication |
|
PSADBW |
Computes difference/adds |
|
PSUBB |
Subtraction |
|
PSUBW |
Subtraction |
|
PSUBD |
Subtraction |
|
PSUBQ |
Subtraction |
|
PSUBQ |
Subtraction |
|
PSUBSB |
Subtraction |
|
PSUBSW |
Subtraction |
|
PSUBUSB |
Subtraction |
|
PSUBUSW |
Subtraction |
For an explanation of the syntax used in code samples in this topic, see Floating-Point Intrinsics Using Streaming SIMD Extensions.