This is the mail archive of the 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]



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));

which makes the compiler report:

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

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, movsi supports moves from SPECIAL_REGS/h (LINK_REGS/l 
is a subset of it) to GENERAL_REGS, so where is the problem?

Index: gcc/config/rs6000/rs6000.h
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.98
diff -u -p -r1.98 rs6000.h
--- gcc/config/rs6000/rs6000.h	2001/01/07 09:17:23	1.98
+++ gcc/config/rs6000/rs6000.h	2001/01/07 17:22:19
@@ -1559,6 +1559,13 @@ typedef struct rs6000_args
    its backpointer, which we maintain.  */
+/* Define this macro as a C expression that is nonzero for registers
+   that are used by the epilogue or the return' pattern.  The stack
+   and frame pointer registers are already be assumed to be used as
+   needed.  */
 /* This macro generates the assembly code for function exit,
    on machines that need it.  If FUNCTION_EPILOGUE is not defined
    then individual return instructions are generated for each

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