This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] i386: Fix GCC running out of registers for bits/string.h

On Mon, 13 Jun 2005, Denis Vlasenko wrote:

> > > //gcc4 compiles this just fine with:
> > > //gcc -O2 -fomit-frame-pointer
> > 
> >  I'm not sure why you chose the non-PIC variation, which works for me as 
> > is...  Anyway, if I substitute your code with the PIC variant, it still 
> > works -- probably the code involved is too trivial.
> My code is a bit different (it explicitly clobbers ebx - see asm outputs),
> maybe that avoids triggering GCC misbehavior.

 The problem is %ebx is fixed for PIC, so this is a no-no, I'm afraid.  
As I've written non-PIC is OK, so you seem to address a non-problem -- 
probably six registers is what makes GCC happy.

> (Also I shaved off one insn using lea, but this ought to be irrelevant)

 I've noticed that and I've wondered why the original code didn't use it
(saving two cycles), but perhaps it was originally written with a 
possibility to use memory here that would preclude a "lea".

> >  There have been two similar bugs filed against GCC already (#15482 and 
> > #21291), but I've decided it's different enough to file it separately -- 
> > this is now bug #22045.
> Also see

 That at least compiles!

> This is exactly what I am complaining about.

 Well, as long as there is a tab between a mnemonic and its operand, it's 
fine with me; I prefer spaces after commas as well to make operands 
clearer.  This is the way I write asms myself.  Trailing control 
characters don't bother me.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]