Sriram Natarajan wrote:
> Hi
>  Our SFW build process uses this  "-xregs=no%appl" while building on 
> sparc/sparcv9. Where can I find more information on this compiler flag ? 
> What does it do ? I am noticing subtle difference in behavior within an 
> application when compiled with -xO4 -xregs=no%appl compared to just 
> compiling with -xO4.
> 
> - Sriram


Start with the cc manpage:

           The -xregs values are for specific -xarch values:

           [no%]appl (SPARC)
                    [Does not] Allow the compiler to generate code
                    using the application registers as scratch
                    registers.  The application registers are:

                    g2, g3, g4 (on 32-bit platforms)
                    g2, g3 (on 64-bit platforms)

                    It is strongly recommended that all system
                    software and libraries be compiled using
                    -xregs=no%appl. System software (including
                    shared libraries) must preserve these regis-
                    ters' values for the application. Their use is
                    intended to be controlled by the compilation
                    system and must be consistent throughout the
                    application.

                    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
                    some old library programs written in assembly
                    code.

- Ali

Reply via email to