Yes, all the public X11 libraries should all be compiled with -xregs=no%appl
(which as noted in the bug you found I added to our Imake config years ago -
  though not as long ago as the bug report says, since I wasn't at Sun in 1998).

We don't have the build logs or workspaces still from snv_48, but in a more
recent snv_59 build log:

rm -f IntAtom.o sparcv9/IntAtom.o
cc -c -Xc -xF -xarch=v8 -xregs=no%appl   -I../.. -I/net/paravon/export/x-re/buil
d/milestone/NV/BIWEEKLY_X_NV_SPARC/xc/lib/X11/../../../proto-sun4-svr4/usr/X11/i
nclude -I/net/paravon/export/x-re/build/milestone/NV/BIWEEKLY_X_NV_SPARC/xc/lib/
X11/../../../proto-sun4-svr4/usr/X11/include/X11 -I/net/paravon/export/x-re/buil
d/milestone/NV/BIWEEKLY_X_NV_SPARC/xc/lib/X11/../../../proto-sun4-svr4/usr/X11/i
nclude/X11/extensions -Dsun -Dsparc -DSVR4 -DSYSV -D__EXTENSIONS__ -DDPMSExtensi
on -DXRECORD -DEVI -DDHAKAZULU -DTSOL -DSUNSOFT -DXSUN    -DXTHREADS -mt -DMALLO
C_0_RETURNS_NULL  -DSUNSOFT -DSUN_CUP   -Kpic -xO3 -xbuiltin -xlibmil -xarch=v9
-dalign -xprefetch  IntAtom.c
mv IntAtom.o sparcv9/IntAtom.o
rm -f IntAtom.o
cc -c -xO3 -xbuiltin -xlibmil  -Xc -xF -xarch=v8 -xregs=no%appl -mt   -I../.. -I
/net/paravon/export/x-re/build/milestone/NV/BIWEEKLY_X_NV_SPARC/xc/lib/X11/../..
/../proto-sun4-svr4/usr/X11/include -I/net/paravon/export/x-re/build/milestone/N
V/BIWEEKLY_X_NV_SPARC/xc/lib/X11/../../../proto-sun4-svr4/usr/X11/include/X11 -I
/net/paravon/export/x-re/build/milestone/NV/BIWEEKLY_X_NV_SPARC/xc/lib/X11/../..
/../proto-sun4-svr4/usr/X11/include/X11/extensions -Dsun -Dsparc -DSVR4 -DSYSV -
D__EXTENSIONS__ -DDPMSExtension -DXRECORD -DEVI -DDHAKAZULU -DTSOL -DSUNSOFT -DX
SUN    -DXTHREADS -mt -DMALLOC_0_RETURNS_NULL  -DSUNSOFT -DSUN_CUP    -Kpic IntA
tom.c

Unless one of the later flags is cancelling it out, or there's a compiler bug,
we should be clean here.

        -alan-

J?rgen Keil wrote:
> Aren't system libraries required not to touch application global registers 
> %g2 - %g4?
> 
> When I look at the disassembly of _XInternAtom in /usr/lib/libX11.so.4
> (from Solaris Nevada snv_48 SPARC), I see that the code is using / thrashing
> global register %g2.
> 
> I see code like this:
> 
>     _XInternAtom+0x264:     94 10 00 11  mov       %l1, %o2
>     _XInternAtom+0x268:     ac 0d e0 03  and       %l7, 0x3, %l6
>     _XInternAtom+0x26c:     84 0a 60 03  and       %o1, 0x3, %g2
>     _XInternAtom+0x270:     80 95 80 02  orcc      %l6, %g2, %g0
> 
> 
> Or this:
> 
>     _XInternAtom+0x2bc:     c4 0d bf ff  ldub      [%l6 - 0x1], %g2
>     _XInternAtom+0x2c0:     16 bf ff f9  bge       -0x1c         
> <_XInternAtom+0x2a4>
>     _XInternAtom+0x2c4:     c4 2d ff ff  stb       %g2, [%l7 - 0x1]
> 
> 
> This breaks applications like qemu, which is trying to use global registers 
> %g2 - %g4;
> but some of these global register variables get thrashed by calls into the X11
> libraries.
> 
> Shouldn't the Solaris X11 shared libraries be compiled with  -xregs=no%appl ?
> 
> See also Bug ID 4166599
> http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4166599
>  
>  
> This message posted from opensolaris.org
> _______________________________________________
> xwin-discuss mailing list
> xwin-discuss at opensolaris.org

-- 
        -Alan Coopersmith-           alan.coopersmith at sun.com
         Sun Microsystems, Inc. - X Window System Engineering


Reply via email to