C-1
APPENDIX C
COMPILER INTRINSICS AND FUNCTIONAL
EQUIVALENTS
The two tables in this chapter itemize the Intel C/C++ compiler intrinsics and functional equiv-
alents for the MMX technology instructions and Streaming SIMD Extensions.
There may be additional intrinsics that do not have an instruction equivalent. It is strongly rec-
ommended that the reader reference the compiler documentation for the complete list of sup-
ported intrinsics. Please refer to the
Intel C/C++ Compiler Users Guide for Win32* Systems With
Streaming SIMD Extension Support (Order Number 718195-00B).
Appendix C catalogs use of these
intrinsics.
The Section 3.1.3., Intel C/C++ Compiler Intrinsics Equivalent of Chapter 3, Instruction Set
Reference has more general supporting information for the following tables.
Table C-1 presents simple intrinsics, and Table C-2 presents composite intrinsics. Some intrin-
sics are composites because they require more than one instruction to implement them.
Most of the intrinsics that use __m64 operands have two different names. If two intrinsic names
are shown for the same equivalent, the first name is the intrinsic for Intel C/C++ Compiler ver-
sions prior to 4.0 and the second name should be used with the Intel C/C++ Compiler version
4.0 and future versions. The Intel C/C++ Compiler version 4.0 will support the old intrinsic
names. Programs written using pre-4.0 intrinsic names will compile with version 4.0. Version
4.0 intrinsic names will not compile on pre-4.0 compilers.
Intel C/C++ Compiler version 4.0 names reflect the following naming conventions:
a "_mm" prefix, followed by a plain spelling of the operation or the actual instructions
mnemonic, followed by a suffix indicating the operand type.
Since there are many different types of integer data that can be contained within a __m64
data item, the following convention is used:
s - indicates scalar
p - indicates packed
i - indicates signed integer, or in some instructions where the sign does not matter,
this is the default
u - indicates an unsigned integer
8, 16, 32, or 64 - the bit size of the data elements.
For example, _mm_add_pi8 indicates addition of packed, 8-bit integers; _mm_slli_pi32() is a
logical left shift with an immediate shift count (the "i" after the name) of a packed, 32-bit integer.