[RFC] EPILOGUE_USES on PPC

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Sun Jan 7 10:04:00 GMT 2001


Hi,

in an effort to bring the regression tester into a better state again, I've 
played with defining EPILOGUE_USES for PPC. This fixes the register renaming 
problems, but breaks glibc compile. I've reduced that to this simple testcase:

void backtrace (void)
{
  void *current;
 
  __asm__ __volatile__ ("" : "=l" (current));
 
  return;
}

which makes the compiler report:

backtrace.c: In function `backtrace':
backtrace.c:7: Can't find a register in class `LINK_REGS' while reloading 
`asm'.

Now, where is the problem? In glibc the asm is solely used to force the push 
of the LR register on the stack. This can be accomplished equally well by 
clobbering LR in the asm.

On the other hand, shouldn't reload be able to cope with that? As far as I 
understand rs6000.md, movsi supports moves from SPECIAL_REGS/h (LINK_REGS/l 
is a subset of it) to GENERAL_REGS, so where is the problem?

Franz.


More information about the Gcc mailing list