Jürgen Keil
2007-Mar-19 11:52 UTC
[qemu-discuss] snv_48: X libraries breaking System V SPARC ABI?
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