[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: Compilation failed on current HEAD
From:       Peter Zijlstra <a.p.zijlstra () chello ! nl>
Date:       2005-07-13 8:47:07
Message-ID: 1121244427.30892.7.camel () twins
[Download RAW message or body]

On Wed, 2005-07-13 at 09:42 +0200, Lars Knoll wrote:
> Hi,
> 
> 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
clobbered.

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@chello.nl>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic