Compilation failed on current HEAD
a.p.zijlstra at chello.nl
Wed Jul 13 01:47:07 PDT 2005
On Wed, 2005-07-13 at 09:42 +0200, Lars Knoll wrote:
> On Tuesday 12 July 2005 23:23, Peter Zijlstra wrote:
> > Hi,
> > I tried to build current HEAD; I needed the following patch to make it
> > work.
> thanks for noting. I applied a slightly different patch (renaming uint back to
> unsigned int).
> > Index: programs/Xserver/fb/fbmmx.c
> > ===================================================================
> > RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbmmx.c,v
> > retrieving revision 1.11
> > diff -u -r1.11 fbmmx.c
> > --- programs/Xserver/fb/fbmmx.c 12 Jul 2005 10:02:10 -0000 1.11
> > +++ programs/Xserver/fb/fbmmx.c 12 Jul 2005 21:22:03 -0000
> > - : "%eax", "%ebx", "%ecx", "%edx"
> > + : "%eax", "%ecx", "%edx"
> do you really need to remove "%ebx" in this line to get it to compile? The
> reason I'm asking is that the assembler clobbers %ebx, so leaving it out
> might lead to gcc generating wrong code.
yes, gcc gives me this:
fbmmx.c:2311: error: PIC register `%ebx' clobbered in `asm'
which of the two asm sections are you referring to; since the first
(starting at line 2311) does a push/pop of ebx hence it should not be
as for the second asm section (as starting on line 2357) if cpuid
clobbers ebx (I failed to check that) then indeed wrong code will be
generated and a push/pop should be inserted around the code.
Peter Zijlstra <a.p.zijlstra at chello.nl>
More information about the xorg