Developer Guide and Reference

Contents

Miscellaneous Intrinsics

The prototypes for Intel® Streaming SIMD Extensions (Intel® SSE) intrinsics for miscellaneous operations are in the
xmmintrin.h
header file.
To use these intrinsics, include the
immintrin.h
file as follows:
#include <immintrin.h>
The results of each intrinsic operation are placed in registers. The information about what is placed in each register appears in the tables below, in the detailed explanation of each intrinsic. R, R0, R1, R2, and R3 represent the registers in which results are placed.
Intrinsic Name
Operation
Corresponding
Intel® SSE Instruction
_mm_shuffle_ps
Shuffle
SHUFPS
_mm_unpackhi_ps
Unpack High
UNPCKHPS
_mm_unpacklo_ps
Unpack Low
UNPCKLPS
_mm_move_ss
Set low word, pass in three high values
MOVSS
_mm_movehl_ps
Move High to Low
MOVHLPS
_mm_movelh_ps
Move Low to High
MOVLHPS
_mm_movemask_ps
Create four-bit mask
MOVMSKPS
_mm_undefined_ps
Return vector of type __m128 with undefined elements.
This is a utility intrinsic that returns some arbitrary value.

_mm_shuffle_ps

__m128 _mm_shuffle_ps(__m128 a, __m128 b, unsigned int imm8);
Selects four specific SP FP values from
a
and
b
, based on the mask
imm8
. The mask must be an immediate. See Macro Function for Shuffle Using Intel® Streaming SIMD Extensions for a description of the shuffle semantics.

_mm_unpackhi_ps

__m128 _mm_unpackhi_ps(__m128 a, __m128 b);
Selects and interleaves the upper two SP FP values from
a
and
b
.
R0
R1
R2
R3
a2
b2
a3
b3

_mm_unpacklo_ps

__m128 _mm_unpacklo_ps(__m128 a, __m128 b);
Selects and interleaves the lower two SP FP values from
a
and
b
.
R0
R1
R2
R3
a0
b0
a1
b1

_mm_move_ss

__m128 _mm_move_ss( __m128 a, __m128 b);
Sets the low word to the SP FP value of
b
. The upper three SP FP values are passed through from
a
.
R0
R1
R2
R3
b0
a1
a2
a3

_mm_movehl_ps

__m128 _mm_movehl_ps(__m128 a, __m128 b);