This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: pgcc-1.1.1 glibc-2.1.1 strptime.c forbidden register



  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


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