m

Tells the compiler to generate code specialized for the processor that executes your program.

IDE Equivalent

None

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

-mcode

Windows:

None

Arguments

code

Indicates the instructions to be generated for the set of processors in each description. Many of the following descriptions refer to Intel® Streaming SIMD Extensions (Intel® SSE) and Supplemental Streaming SIMD Extensions (Intel® SSSE). Possible values are:

avx

May generate Intel® Advanced Vector Extensions (Intel® AVX), SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions.

sse4.2

May generate Intel® SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions.

sse4.1

May generate Intel® SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions.

ssse3

May generate Intel® SSSE3, SSE3, SSE2, and SSE instructions.

sse3

May generate Intel® SSE3, SSE2, and SSE instructions.

sse2

May generate Intel® SSE2 and SSE instructions. This value is only available on Linux systems.

sse

This option has been deprecated; it is now the same as specifying ia32.

ia32

Generates x86/x87 generic code that is compatible with IA-32 architecture. Disables any default extended instruction settings, and any previously set extended instruction settings. It also disables all processor-specific optimizations and instructions. This value is only available on Linux systems using IA-32 architecture.

Default

Linux systems: -msse2
Mac OS X systems using IA-32 architecture: -msse3
Mac OS X systems using Intel® 64 architecture: -mssse3

For more information on the default values, see Arguments above.

Description

This option tells the compiler to generate code specialized for the processor that executes your program.

Code generated with these options should execute on any compatible, non-Intel processor with support for the corresponding instruction set.

Options -x and -m are mutually exclusive. If both are specified, the compiler uses the last one specified and generates a warning.

For compatibility with gcc, the compiler allows the following options but they have no effect. You will get a warning error, but the instructions associated with the name will not be generated. You should use the suggested replacement options.

gcc Compatibility Option

Suggested Replacement Option

-mfma

-march=core-avx2

-mbmi, -mavx2, -mlzcnt

-march=core-avx2

-mmovbe

-march=atom -minstruction=movbe

-mcrc32, -maes, -mpclmul, -mpopcnt

-march=corei7

-mvzeroupper

-march=corei7-avx

-mfsgsbase, -mrdrnd, -mf16c

-march=core-avx-i

Alternate Options

Linux and Mac OS X: None

Windows: /arch

See Also


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.