IA-32 Intel® Architecture Optimization
3-2
Checking for Processor Support of SIMD
Technologies
This section shows how to check whether a processor supports MMX
technology, SSE, SSE2, or SSE3.
SIMD technology can be included in your application in three ways:
1.
Check for the SIMD technology during installation. If the desired
SIMD technology is available, the appropriate DLLs can be
installed.
2.
Check for the SIMD technology during program execution and
install the proper DLLs at runtime. This is effective for programs
that may be executed on different machines.
3.
Create a “fat” binary that includes multiple versions of routines;
versions that use SIMD technology and versions that do not. Check
for SIMD technology during program execution and run the
appropriate versions of the routines. This is especially effective for
programs that may be executed on different machines.
Checking for MMX Technology Support
To check if MMX technology is available on your system, use
cpuid
to
and check the feature flags in the
edx
register. If
cpuid
returns bit 23
set to 1 in the feature flags, the processor supports MMX technology.
Use the code segment in Example 3-1 to test for the existence of MMX
technology.
Summary of Contents for ARCHITECTURE IA-32
Page 1: ...IA 32 Intel Architecture Optimization Reference Manual Order Number 248966 013US April 2006...
Page 220: ...IA 32 Intel Architecture Optimization 3 40...
Page 434: ...IA 32 Intel Architecture Optimization 9 20...
Page 514: ...IA 32 Intel Architecture Optimization B 60...
Page 536: ...IA 32 Intel Architecture Optimization C 22...