John Martin wrote: > >> >> So do we need to file this as a compiler bug? >> > At best all I can say now is what the above compiler versions emit > for pure C code on SPARC with "-xregs=no%appl". If I understood > why other 32 bit "system" libraries in /usr/lib don't destructively use > %g2, I would agree it is a compiler bug. Things I still need > to investigate: > > Are 32 bit system libraries still being built with SOS8? > > If not, are the 32 bit system libraries being built with a > new/different option? > Here's the command line for building the 32 bit malloc.c:
/ws/onnv-tools/SUNWspro/SS11/bin/cc -O -K pic -xspace -Xa -xildoff -errtags=yes -errwarn=%all -erroff=E_EMPTY_TRANSLATION_UNIT -erroff=E_STATEMENT_NOT_REACHED -xc99=%all -W0,-xglobalstatic -v -g -xc99=%all -W0,-noglobal -xdebugformat=stabs -xinline= -g -xc99=%all -W0,-noglobal -xdebugformat=stabs -D_REENTRANT -Di386 -I../i386/inc -I../inc -DTEXT_DOMAIN="SUNW_OST_OSLIB" -D_TS_ERRNO -I/export/src/onnv-clone/proto/root_i386/usr/include -DPIC -D_REENTRANT -c -o pics/malloc.o ../port/gen/malloc.c I don't see it using "-xregs=no%appl" any more. The -W0 options aren't well defined in the man page. I tried both "-W0,-noglobal" and "-W0,-xglobalstatic" for IntAtom.c and the %g2 registers are still there. Removing "-xregs=no%appl" causes *more* %g2 registers to appear, so it appears to be doing something.
