This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: pgcc-1.1.1 glibc-2.1.1 strptime.c forbidden register
- To: Joe Buck <jbuck at Synopsys dot COM>
- Subject: Re: pgcc-1.1.1 glibc-2.1.1 strptime.c forbidden register
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Fri, 09 Apr 1999 15:34:18 -0600
- cc: jkinsley at bticc dot net, bug-glibc at gnu dot org, pgcc at delorie dot com, pcg at goof dot com, egcs at egcs dot cygnus dot com, egcs-bugs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <199904092102.OAA13655@atrus.synopsys.com>you write:
> > > strptime.c: In function `strptime_internal':
> > > strptime.c:818: fixed or forbidden register 3 (bx) was spilled for cl
> ass
> > > GENERAL_REGS.
>
> > There's an asm in that code that requires 6 registers to satisfy. Howeve
> r,
> > when compiling with -fPIC the compiler is only allowed to allocate 5 regi
> sters.
>
> Perhaps this condition should be detected directly? (Count the # of
> registers needed, if it exceeds the number available, issue a message
> saying that).
That's what (in effect) the code is doing. Certainly the message could
be clearer :-)
The problem is even if we tell the user that the asm needed too many registers,
it's not always clear why.
For example consider an input operand that is an array element. If we use
indexed addressing to access the element, then it needs two registers even
though (at the source level) is uses only one. For these cases it would be
nice if we reloaded the address as a whole so that the asm itself only needed
a single register for the asm itself.
jeff