The -x{i|M|K|W} option specifies the minimum set of processor extensions required to exist on processors on which you execute your program. The resulting code can contain unconditional use of the specified processor extensions. When you use -x{i|M|K|W} the code generated by the compiler might not execute correctly on IA-32 processors that lack the specified extensions.
The following example compiles the program myprog.cpp,
using the i extension. This means the program
will require Intel
prompt> icc -O2 tpp6 -xi -o myprog myprog.cpp
The resulting program, myprog, might not execute on a Pentium processor, but will execute on Pentium Pro, Pentium II, Pentium III, and Pentium 4 processors.
Caution
If a program compiled with -x{i|M|K|W} is executed
on a processor that lacks the specified extensions, it can fail with an
illegal instruction exception, or display other unexpected behavior.
To Optimize for... | Use this option |
---|---|
Pentium Pro and Pentium II processors, which use the CMOV, FCMOV, and FCOMI instructions | -xi |
Pentium processors with MMX(TM) technology instructions (does not imply i instructions). | -xM |
Pentium III processor with the Streaming SIMD Extensions, implies i and M instructions | -xK |
Pentium 4 processor with the Streaming SIMD Extensions 2, implies i, M, and K instructions | -xW |