Exclusive Specialized Code with -x{i|M|K|W}

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.f, using the i extension. This means the program will require Pentium Pro, Pentium II processors, and later architectures to execute.

prompt> ifc -O2 -tpp6 -xi myprog.f

The resulting program, myprog, might not execute on a Pentium processor, but will execute on PentiumŪ Pro, Pentium II, and Pentium III 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.

-x Summary

To Optimize for...

Use this option

Pentium Pro and Pentium II processors, which use the CMOV and FCMOV, and FCOMI instructions

-xi

Pentium processors with MMX(TM) technology 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

You can specify more than one code with the -x option. For example, if you specify -xMK, the compiler will decide whether the resulting executable will benefit better from the MMX technology (M) or the Streaming SIMD Extensions (K). It is the developer's responsibility to use the option's version corresponding to the processor generation.