To: Joe Buck 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 Subject: Re: pgcc-1.1.1 glibc-2.1.1 strptime.c forbidden register In-reply-to: Your message of Fri, 09 Apr 1999 14:02:27 PDT. <199904092102 DOT OAA13655 AT atrus DOT synopsys DOT com> Date: Fri, 09 Apr 1999 15:34:18 -0600 Message-ID: <27769.923693658@upchuck> From: Jeffrey A Law Note-from-DJ: This may be spam Reply-To: pgcc AT delorie DOT com In message <199904092102 DOT OAA13655 AT atrus DOT synopsys DOT 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