Tells the compiler to generate optimized code specialized for the processor that executes your program.
Windows: Optimization
> Require Intel(R) Processor Extensions
Linux: None
Mac OS X: Optimization > Require Intel(R)
Processor Extensions
IA-32 architecture, Intel® 64 architecture
Linux and Mac OS X: | -xprocessor |
Windows: | /Qxprocessor |
processor | Is a value used to target specific processors or microarchitectures. Possible values are: | |
S | Can generate SSE4 Vectorizing Compiler and Media Accelerators instructions for future Intel processors that support the instructions. Can generate SSSE3, SSE3, SSE2, and SSE instructions and it can optimize for future Intel processors. | |
T | Can generate SSSE3, SSE3, SSE2, and SSE instructions for Intel processors, and it can optimize for the Intel® Core™2 Duo processor family. | |
P | Can generate SSE3, SSE2, and SSE instructions for Intel processors, and it can optimize for processors based on Intel® Core™ microarchitecture and Intel NetBurst® microarchitecture, like Intel® Core™ Duo processors, Pentium® 4 processors with SSE3, and Intel® Xeon® processors with SSE3. | |
O | Can generate SSE3, SSE2, and SSE
instructions, and it can optimize for Intel processors based on Intel®
Core™
microarchitecture and Intel Netburst® microarchitecture. Generated code might operate on processors not made by Intel that support SSE3, SSE2 and SSE instruction sets. This value does not enable some optimizations enabled in the S, T, and P processor values. See Description for use on other processors. | |
B | Deprecated. Can generate SSE2 and SSE instructions for Intel processors, and it can optimize for the Intel® Pentium® M processors. | |
N | Can generate SSE2 and SSE instructions for Intel processors, and it can optimize for Intel® Pentium® 4 processors and Intel® Xeon® processors with SSE2. | |
W | Can generate SSE2 and SSE instructions,
and it can optimize for Intel® Pentium® 4 processors and Intel® Xeon®
processors with SSE2. Generated code may operate on processors not made by Intel that support SSE2. This value does not enable some optimizations enabled in the B and N processor values. See Description for use on other processors. | |
K | Can generate SSE instructions and
it can optimize for Intel® Pentium® III processors and Intel® Pentium®
III Xeon® processors. Generated code may operate on processors not made
by Intel that support SSE instructions. See Description for use on other processors. |
Windows and Linux systems using
IA-32 architecture: OFF Windows and Linux systems using Intel® 64 architecture: -xW Mac OS X systems using IA-32 architecture: -xP Mac OS X systems using Intel® 64 architecture: -xT |
On Windows and Linux systems using
IA-32 architecture, the compiler does not generate optimized code specialized
for the processor. For more information on the default values shown for other operating systems or architectures, see Arguments. |
This option tells the compiler to generate optimized code specialized for the processor that executes your program. The specialized code generated by this option may run only on a subset of Intel processors.
This option can enable optimizations depending on the argument specified. For example, it may enable Intel® Streaming SIMD Extensions 4 (SSE4), Supplemental Streaming SIMD Extensions 3 (SSSE3), Streaming SIMD Extensions 3 (SSE3), Streaming SIMD Extensions 2 (SSE2), or Streaming SIMD Extensions (SSE) instructions.
The binaries produced by these values will run on Intel processors that support all of the features for the targeted processor. For example, binaries produced with W will run on an Intel® Core™2 Duo processor, because that processor completely supports all of the capabilities of the Intel® Pentium® 4 processor, which the W value targets. Specifying the T value has the potential of using more features and optimizations available to the Intel® Core™2 Duo processor.
Do not use processor values S, T, P, O, W, N, B, or K to create binaries that will execute on a processor that is not compatible with the targeted processor. The resulting program may fail with an illegal instruction exception or display other unexpected behavior. For example, binaries produced with W may produce code that will not run on Intel® Pentium® III processors or earlier processors that do not support SSE2 instructions.
Compiling the main program with processor values S, T, P, N, or B produces binaries that display a fatal run-time error if they are executed on unsupported processors. For more information, see Optimizing Applications.
If you specify more than one processor value, code is generated for only the highest-performing processor specified. The highest-performing to lowest-performing processor values are: S, T, P, O, B, N, W, K.
The processor values O, W, and K produce binaries that should run on processors not made by Intel that implement the same capabilities as the corresponding Intel processors.
On Linux and Windows systems using Intel® 64 architecture, B, N, and K are not valid processor values.
On Mac OS X systems using IA-32 architecture, S, T, and P are valid processor values. On these systems, P is the default and is always set. On Mac OS X systems using Intel® 64 architecture, S and T are the only valid processor values. On these systems, T is the default and is always set.
-xK | Linux : -march=pentium3 Mac OS X: None Windows: None |
-xW | Linux : -march=pentium4 Mac OS X: None Windows: None |
ax, Qax compiler options