[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]
>This lists, beside others, e.g.
> cc -D_KERNEL -xO3 xx1.c # 32 bit
> cc -D_KERNEL -xcg92 -xarch=v9 -xcode=abs32 -xO3 -c xx1.c # 64 bit SPARC
>whereas "Notes on 64-bit Drivers and STREAMS -- A White Paper" lists:
> cc -D_KERNEL -xarch=v9 -xcode=abs32 -xregs=no%appl -xO3 -c xx1.c # 64 bit
>I wonder if -xregs=no%appl is required (Sun seems to use it even
>for the 32 bit kernel and for shared libraries) whose gcc equivalent
>seems to be -mno-app-regs.
-xregs=no%appl is not strictly required, but initial versions of
the Solaris 7 64 bit kernel woudl balk at the "REGSYMS" this generated
for global register usage.
In the 64 bit ABI, some global registers have been assigned for application
use; when the compiler generates them in code, it will output a "REGSYM"
telling the linker how it was used. The linker can then flag conflicting
usage.
The -xregs=no%appl is *required* for libraries. Libraries are not allowed
to use those global registers as they are "application reserved.
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.