arch

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

IDE Equivalent

Windows: Code Generation > Enable Enhanced Instruction Set

Linux: None

Mac OS X: None

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

-archprocessor

Windows:

/arch:processor

Arguments

processor

Is the processor type. Possible values are:

IA32

Generates code that will run on any Pentium or later processor. Disables any default extended instruction settings, and any previously set extended instruction settings. This value is only available on Linux and Windows systems using IA-32 architecture.

SSE

This is the same as specifying IA32.

SSE2

Generates code for Intel® Streaming SIMD Extensions 2 (Intel® SSE2). This value is only available on Linux and Windows systems.

SSE3

Generates code for Intel® Streaming SIMD Extensions 3 (Intel® SSE3).

SSSE3

Generates code for Intel® Supplemental Streaming SIMD Extensions 3 (Intel® SSSE3).

SSE4.1

Generates code for Intel® Streaming SIMD Extensions 4 Vectorizing Compiler and Media Accelerators.

Default

Windows and Linux systems: SSE2
Mac OS X systems using IA-32 architecture: SSE3
Mac OS X systems using Intel® 64 architecture: SSSE3

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

Description

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

Code generated with the values IA32, SSE, SSE2, or SSE3 should execute on any compatible non-Intel processor with support for the corresponding instruction set.

Options /arch and /Qx are mutually exclusive. If both are specified, the compiler uses the last one specified and generates a warning.

For compatibility with Compaq* Visual Fortran, the compiler allows the following keyword values. However, you should use the suggested replacements.

Compatibility Value

Suggested Replacement

pn1

-mia32 or /arch:IA32

pn2

-mia32 or /arch:IA32

pn3

-mia32 or /arch:IA32

pn4

-msse2 or /arch:SSE2

Alternate Options

Linux and Mac OS X: -m

Windows: /architecture

See Also