march

Tells the compiler to generate code for a specified processor.

IDE Equivalent

None

Architectures

IA-32 architecture, IntelŪ 64 architecture

Syntax

Linux: -march=processor
Mac OS X:  None
Windows:  None

Arguments

processor Is the processor for which the compiler should generate code. Possible values are:
  pentium3 Generates code for IntelŪ PentiumŪ III processors.
  pentium4 Generates code for IntelŪ PentiumŪ 4 processors.
  core2 Generates code for the IntelŪ Core™2 processor family.

Default

OFF or
-march=pentium4
On IA-32 architecture, the compiler does not generate processor-specific code unless it is told to do so. On systems using IntelŪ 64 architecture, the compiler generates code for Intel Pentium 4 processors.

Description

This option tells the compiler to generate code for a specified processor.

Specifying -march=pentium4 sets -mtune=pentium4.

For compatibility, a number of historical processor values are also supported, but the generated code will not differ from the default.

Alternate Options

-march=pentium3 Linux: -xK
Mac OS X: None
Windows: /QxK
-march=pentium4 Linux: -xW
Mac OS X: None
Windows: /QxW
-march=core2 Linux and Mac OS X: -xT
Windows: /QxT