Sun WorkShop Compiler C 5.0 User's Guide

-xarch=a

Specifies the set of instructions the compiler may use.

a must be one of: generic, v7, v8a, v8, v8plus, v8plusa, v9, v9a, 386, pentium_pro.

Although this option can be used alone, it is part of the expansion of the -xtarget option; its primary use is to override a value supplied by the -xtarget option.

This option limits the instructions generated to those of the specified architecture, and allows the specified set of instructions. The option does not guarantee the specified set is used; however, under optimization, the set is usually used.

If this option is used with optimization, the appropriate choice can provide good performance of the executable on the specified architecture. An inappropriate choice can result in serious degradation of performance.

v7, v8, and v8a are all binary compatible. v8plus and v8plusa are binary compatible with each other and forward, but not backward. For any particular choice, the generated executable can run much more slowly on earlier architectures.

v9 and v9a are binary compatible with each other, but not backward compatible with the earlier architectures, and are available only on Solaris 7.

Table 2-1 The -xarch Values

Value 

Meaning 

 generic

Gets good performance on most x86 and SPARC architectures, major degradation on none.  

 

This is the default. This option uses the best instruction set for good performance on most x86 and SPARC processors without major performance degradation on any of them. With each new release, this best instruction set will be adjusted, if appropriate.  

 v7

Limits instruction set to V7 architecture. 

 

This option uses the best instruction set for good performance on the V7 architecture, but without the quad-precision floating-point instructions. This is equivalent to using the best instruction set for good performance on the V8 architecture, but without the following instructions:

The quad-precision floating-point instructions 

The integer mul and div instructions

The fsmuld instruction

 

Examples: SPARCstation 1, SPARCstation 2 

 v8a

Limits instruction set to the V8a version of the V8 architecture. 

By definition, V8a means the V8 architecture, but without: 

The quad-precision floating-point instructions 

The fsmuld instruction

This option uses the best instruction set for good performance on the V8 architecture. 

 

Example: Any machine based on MicroSPARC(TM)I chip architecture. 

 v8

Limits instruction set to V8 architecture. 

 

This option uses the best instruction set for good performance on the V8 architecture, but without quad-precision floating-point instructions. 

 

Example: SPARCstation 10 

 v8plus

Limits instruction set to the V8plus version of the V9 architecture. 

 

By definition, V8plus, or V8+, means the V9 architecture, except: 

Without the quad-precision floating-point instructions 

Limited to the 32-bit subset defined by the V8+ specification 

Without the VIS instructions 

 

This option uses the best instruction set for good performance on the V8+ architecture. In V8+, a system with the 64-bit registers of V9 runs in 32-bit addressing mode, but the upper 32 bits of the i and l registers must not affect program results. 

 

Example: Any machine based on UltraSPARC(TM)chip architecture. 

 

Use of this option also causes the .o file to be marked as a V8+ binary; such files will not run on a v7 or v8 machine.

 v8plusa

Limits instruction set to the V8plusa version of the V9 architecture and version 1.0 of the Visual Instruction Set (VIS). 

By definition, V8plusa means the V8plus architecture, plus: 

The UltraSPARC-specific instructions 

The VIS instructions 

This option uses the best instruction set for good performance on the UltraSPARC architecture but limited to the 32-bit subset defined by the V8+ specification. 

 

Example: Any machine based on UltraSPARC chip architecture. 

 

Use of this option also causes the .o file to be marked as a Sun-specific V8+ binary; such files will not run on a v7 or v8 machine.

 v9

Limits instruction set to the V9 architecture. The resulting .o object files are in 64-bit ELF format and can only be linked with other object files in the same format. The resulting executable can only be run on a 64-bit SPARC processor running 64-bit Solaris 7 with the 64-bit kernel. Compiling with this option uses the best instruction set for good performance on the V9 SPARC architecture, but without the use of quad-precision floating-point instructions.

 

This option is not available on versions of SunOS prior to the Solaris 7 release. 

 v9a

Limits instruction set to the SPARC-V9 architecture, adding the Visual Instruction Set (VIS) and extensions specified to UltraSPARC processors. The resulting .o object files are in 64-bit ELF format and can only be linked with other object files in the same format. The resulting executable can only be run on a 64-bit SPARC processor running 64-bit Solaris 7 with the 64-bit kernel. Compiling with this option uses the best instruction set for good performance on the V9 UltraSPARC architecture, but without the use of quad-precision floating-point instructions. (Available only on 64-bit Solaris 7.)

 

This option is not available on versions of SunOS prior to the Solaris 7 release. 

 386

Limits instruction set to the Intel x86 architecture. 

 pentium_pro

Limits instruction set to the Intel pentium_pro architecture.