Sun Studio 12 Update 1: Fortran User's Guide

3.4.165 –xregs=r

Specify register usage.

r is a comma–separated list that consists of one or more of the following:

[no%]appl, [no%]float.

Where the % is shown, it is a required character.

Example: -xregs=appl,no%float

Prefix the suboption with no% to disable the feature.

appl

(SPARC) Allow the compiler to generate code using the application registers as scratch registers. These are the g2, g3, and g4 registers on 32–bit processors, and g2, g3 on 64–bit processors.

float

(SPARC only) Allow the compiler to use the floating–point registers as scratch registers for integer values. This option has no effect on the compiler’s use of floating-point registers for floating-point values.

no%float

Do not use the floating–point registers. With this option, a source program cannot contain any floating–point code.

frameptr

(x86 only) Allow the compiler to use the frame-pointer register (%ebp on 32–bit x86, %rbp on 64–bit x86 processors) as an unallocated callee-saves register to improve program performance. -xregs=frameptr is ignored when also compiling with -xpg or -p.

The default is -xregs=appl,float on SPARC platforms,-xregs=appl,float,no%frameptr on x86.

It is strongly recommended that you compile code intended for shared libraries that will link with applications with -xregs=no%appl,float. At the very least, the shared library should explicitly document how it uses the application registers so that applications linking with those libraries know how to cope with the issue.

For example, an application using the registers in some global sense (such as using a register to point to some critical data structure) would need to know exactly how a library with code compiled without -xregs=no%appl is using the application registers in order to safely link with that library.