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

C-2 Vol. 2B
INTEL® C/C++ COMPILER INTRINSICS AND FUNCTIONAL EQUIVALENTS
The packed values are represented in right-to-left order, with the lowest value being
used for scalar operations. Consider the following example operation:
double a[2] = {1.0, 2.0};
__m128d t = _mm_load_pd(a);
The result is the same as either of the following:
__m128d t = _mm_set_pd(2.0, 1.0);
__m128d t = _mm_setr_pd(1.0, 2.0);
In other words, the XMM register that holds the value t will look as follows:
The “scalar” element is 1.0. Due to the nature of the instruction, some intrinsics
require their arguments to be immediates (constant integer literals).
To use an intrinsic in your code, insert a line with the following syntax:
data_type intrinsic_name (parameters)
Where:
data_type Is the return data type, which can be either void, int,
__m64, __m128, __m128d, or __m128i. Only the
_mm_empty intrinsic returns void.
intrinsic_name Is the name of the intrinsic, which behaves like a function
that you can use in your C/C++ code instead of in-lining the
actual instruction.
parameters Represents the parameters required by each intrinsic.
C.1 SIMPLE INTRINSICS
NOTE
For detailed descriptions of the intrinsics in Table C-1, see the corre-
sponding mnemonic in Chapter 3 in the “Intel® 64 and IA-32 Archi-
tectures Software Developer’s Manual, Volume 2A”, or Chapter 4,
“Instruction Set Reference, N-Z” in the “Intel® 64 and IA-32 Archi-
tectures Software Developer’s Manual, Volume 2B”.
0127 64 63
2.0 1.0