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

Maciej W. Rozycki macro@linux-mips.org
Thu Jun 9 14:48:00 GMT 2005


On Thu, 9 Jun 2005, Denis Vlasenko wrote:

> > $ ../configure --prefix=/usr --enable-add-ons --enable-omitfp --build=i386-linux
> > $ make
> > 
> > using GCC 4.0.0 I have got the following error:
> > 
> > dcigettext.c: In function '_nl_find_msg':
> > ../sysdeps/i386/bits/string.h:655: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
> 
> Cannot reproduce it here in a isolated testcase.

 Make sure the calling function strcspn() is inlined into also uses 
alloca() (preferably with a variable argument, but I think GCC currently 
doesn't optimize it even for a constant) so that %ebp is used for the 
frame pointer and therefore unavailable.

 Building strcspn() standalone certainly is going to work.

  Maciej



More information about the Libc-alpha mailing list