|
General Support Intrinsics
Intrinsic name | Operation | Signed | Saturation | Assembly instruction |
---|---|---|---|---|
_mm_empty | Empties MM state | Not applicable | Not applicable | EMMS |
_mm_cvtsi32_si64 | Converts from int | Not applicable | Not applicable | MOVD |
_mm_cvtsi64_si32 | Converts from int | Not applicable | Not applicable | MOVD |
_mm_packs_pi16 | Packs | Yes | Yes | PACKSSWB |
_mm_packs_pi32 | Packs | Yes | Yes | PACKSSDW |
_mm_packs_pu16 | Packs | No | Yes | PACKUSWB |
_mm_unpackhi_pi8 | Interleaves | Not applicable | Not applicable | PUNPCKHBW |
_mm_unpackhi_pi16 | Interleaves | Not applicable | Not applicable | PUNPCKHWD |
_mm_unpackhi_pi32 | Interleaves | Not applicable | Not applicable | PUNPCKHDQ |
_mm_unpacklo_pi8 | Interleaves | Not applicable | Not applicable | PUNPCKLBW |
_mm_unpacklo_pi16 | Interleaves | Not applicable | Not applicable | PUNPCKLWD |
_mm_unpacklo_pi32 | Interleaves | Not applicable | Not applicable | PUNPCKLDQ |
Packed Arithmetic Intrinsics
Intrinsic name | Operation | Signed | Argument and result values/bits | Corresponding instruction |
---|---|---|---|---|
_mm_add_pi8 | Adds | Not applicable | 8/8, 8/8 | PADDB |
_mm_add_pi16 | Adds | Not applicable | 4/16, 4/16 | PADDW |
_mm_add_pi32 | Adds | Not applicable | 2/32, 2/32 | PADDD |
_mm_adds_pi8 | Adds | Yes | 8/8, 8/8 | PADDSB |
_mm_adds_pi16 | Adds | Yes | 4/16, 4/16 | PADDSW |
_mm_adds_pu8 | Adds | No | 8/8, 8/8 | PADDUSB |
_mm_adds_pu16 | Adds | No | 4/16, 4/16 | PADDUSW |
_mm_sub_pi8 | Subtracts | Not applicable | 8/8, 8/8 | PSUBB |
_mm_sub_pi16 | Subtracts | Not applicable | 4/16, 4/16 | PSUBW |
_mm_sub_pi32 | Subtracts | Not applicable | 2/32, 2/32 | PSUBD |
_mm_subs_pi8 | Subtracts | Yes | 8/8, 8/8 | PSUBSB |
_mm_subs_pi16 | Subtracts | Yes | 4/16, 4/16 | PSUBSW |
_mm_subs_pu8 | Subtracts | No | 8/8, 8/8 | PSUBUSB |
_mm_subs_pu16 | Subtracts | No | 4/16, 4/16 | PSUBUSW |
_mm_madd_pi16 | Multiplies | Not applicable | 4/16, 2/32 | PMADDWD |
_mm_mulhi_pi16 | Multiplies | Yes | 4/16, 4/16 (high) | PMULHW |
_mm_mullo_pi16 | Multiplies | Not applicable | 4/16, 4/16 (low) | PMULLW |
Logical Intrinsics
Intrinsic name | Operation | Corresponding instruction |
---|---|---|
_mm_and_si64 | Bitwise AND | PAND |
_mm_andnot_si64 | Logical NOT | PANDN |
_mm_or_si64 | Bitwise OR | POR |
_mm_xor_si64 | Bitwise exclusive OR | PXOR |
Compare Intrinsics
Intrinsic name | Comparison | Number of elements | Element bit size | Corresponding instruction |
---|---|---|---|---|
_mm_cmpeq_pi8 | Equals | 8 | 8 | PCMPEQB |
_mm_cmpeq_pi16 | Equals | 4 | 16 | PCMPEQW |
_mm_cmpeq_pi32 | Equals | 2 | 32 | PCMPEQD |
_mm_cmpgt_pi8 | Greater than | 8 | 8 | PCMPGTB |
_mm_cmpgt_pi16 | Greater than | 4 | 16 | PCMPGTW |
_mm_cmpgt_pi32 | Greater than | 2 | 32 | PCMPGTD |
Set Intrinsics
Intrinsic name | Operation | Number of elements | Element bit size | Signed | Reverse order |
---|---|---|---|---|---|
_mm_setzero_si64 | Sets to zero | 1 | 64 | No | No |
_mm_set_pi32 | Sets integer values | 2 | 32 | No | No |
_mm_set_pi16 | Sets integer values | 4 | 16 | No | No |
_mm_set_pi8 | Sets integer values | 8 | 8 | No | No |
_mm_set1_pi32 | Sets integer values | 2 | 32 | Yes | No |
_mm_set1_pi16 | Sets integer values | 4 | 16 | Yes | No |
_mm_set1_pi8 | Sets integer values | 8 | 8 | Yes | No |
_mm_setr_pi32 | Sets integer values | 2 | 32 | No | Yes |
_mm_setr_pi16 | Sets integer values | 4 | 16 | No | Yes |
_mm_setr_pi8 | Sets integer values | 8 | 8 | No | Yes |
To create link towards this article on your website,
copy and paste the text below in your page.
Preview :
Powered by QuoteThis © 2008