apogee-software apogee compilers c & c++ & fortran 77 & fortran 90 User Manual

Page of 223
Chapter 4: Control-Variable Definitions
General Code Control
Apogee User’s Manual  Page 95
Control-Variable g — Symbolic Debugging
Symbolic debugging information may be included in the assembly files produced by the
compiler by use of the
g
 control-variable, as follows:
-Xg=0
Do not include symbolic debugging information in the assembly files.
-Xg=1
Include the Solaris 1 form of symbolic debugging information in the
assembly file for use by a symbolic debugger.  The Solaris 1 form of
debugging information is useful under Solaris 2 when running
products that have not been upgraded to accept the new form of
debugging directives.
-Xg=2
Include symbolic debugging information in the assembly file for use
by a symbolic debugger.  The form of debugging information placed
in the assembly file is determined by the OS in use.
The
g
 control-variable has compilation scope and accepts values of
0
,
1
, and
2
.  The first-
default-value is
g=0
, and the second-default-value is
g=2
.
Control-Variable glbreg — Use of Global Registers in Compiled
Code
The SPARC ABI (see the System V Application Binary Interface, SPARC Processor
Supplement) permits some flexibility with respect to the usage of six of the SPARC processor
registers, as follows:
Global integer registers 2, 3, and 4 are reserved for the application software.  System
software (including the libraries described in Chapter 6) preserves these registers’
values for the application.  Their use is intended to be controlled by the compilation
system and must be consistent throughout the application.
Global integer registers 5, 6, and 7 are reserved for system software.  Because system
software provides the low-level operating system interface, including signal handling,
an application cannot change the registers and safely preserve the system values, even
by saving and restoring them across function calls.  Therefore, application software
must not change these registers’ values.
This flexibility appears to have caused some confusion among software developers.  Until
recently, compilers from SunPro did not appear to use any of the six registers, nor did normal
system software.  The only use of these registers we have observed is in some rarely used
performance monitoring tools.
Newer compilers from SunPro have options to permit usage of these six registers.  Clearly, the
ability to use
g5
 through
g7
 in compiled code would be useful for compiling system code,
however, Sun has recently published benchmark results where benchmark application code
uses
g5
 through
g7
, showing that it is at least possible to use these three registers in
application code under current system software.
The use of these six global registers by compiled code is controlled in Apogee compilers by use
of the
glbreg
 control-variable, as follows: