The -x{K|W|N|B|P} options target your program to run on a specific Intel processor. The resulting code might contain unconditional use of features that are not supported on other processors.
Option | Specific Optimization for... |
---|---|
-xK | Intel® Pentium® III and compatible Intel processors. |
-xW | Intel Pentium 4 and compatible Intel processors. |
-xN | Intel Pentium 4 and compatible Intel processors. Programs, where the function main() is compiled with this option, will detect non-compatible processors and generate an error message during execution. This option also enables new optimizations in addition to Intel processor-specific optimizations. |
-xB | Intel Pentium M and compatible Intel processors. Programs, where the function main() is compiled with this option, will detect non-compatible processors and generate an error message during execution. This option also enables new optimizations in addition to Intel processor-specific optimizations. |
-xP | Intel processors code-named "Prescott". Programs, where the function main() is compiled with this option, will detect non-compatible processors and generate an error message during execution. This option also enables new optimizations in addition to Intel processor-specific optimizations. |
To execute a program on x86 processors not provided by Intel Corporation, do not specify the -x{K|W|N|B|P} option.
The invocation below compiles prog.cpp for Intel Pentium 4 and compatible processors. The resulting binary might not execute correctly on Pentium, Pentium Pro, Pentium II, Pentium III, or Pentium with MMX technology processors, or on x86 processors not provided by Intel corporation.
prompt>icpc -xW prog.cpp
Caution
If a program compiled with -x{K|W|N|B|P} is executed
on a non-compatible processor, it might fail with an illegal instruction
exception, or display other unexpected behavior. Executing programs compiled
with -xN, -xB, or -xP on unsupported processors (see table above) will
display the following run-time error:
Fatal Error : This program was not built to run on the processor in your system.