C++ User's Guide

-xregs=r[,...r]

SPARC: Controls scratch register usage.

The compiler can generate faster code if it has more registers available for temporary storage (scratch registers). This option makes available additional scratch registers that might not always be appropriate.

Values

r must be one of the following (meaning depends upon the -xarch setting):

Value of r

Meaning 

[no%]appl

 

[Does not] Allows use of registers g2, g3, and g4 (v8, v8a) 

[Does not] Allows use of registers g2, g3, g4, and g5 (v8plus, v8plusa) 

[Does not] Allows use of registers g2, g3 (v9, v9a) 

 

In the SPARC ABI, these registers are described as application registers. Using these registers can increase performance because fewer load and store instructions are needed. However, such use can conflict with programs that use the registers for other purposes.

[no%]float

 

[Does not] Allows use of floating-point registers as specified in the SPARC ABI.  

 

You can use the floating-point registers even if the program contains no floating point code. 

 

With the no%float option a source program cannot contain any 

floating-point code.  

Defaults

If -xregs is not specified, -xregs=appl,float is assumed.

Examples

To compile an application program using all available scratch registers, use:

-xregs=appl,float

To compile non-floating-point code sensitive to context switch, use:

-xregs=no%appl,no%float

See also

SPARC V7/V8 ABI, SPARC V9 ABI