march

Tells the compiler to generate code for a specified CPU.

IDE Equivalent

None

Architectures

IA-32 architecture, Intel® 64 architecture

Syntax

Linux: -march=cpu
Mac OS:  None
Windows:  None

Arguments

cpu

Is the CPU 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.

Default

OFF or
-march=pentium4
On IA-32 systems, 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 CPU.

Specifying -march=pentium4 sets -mtune=pentium4.

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

Alternate Options

-march=pentium3 Linux: -xK
Mac OS: None
Windows: /QxK
-march=pentium4 Linux: -xW
Mac OS: None
Windows: /QxW