This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] EPILOGUE_USES on PPC
On Monday 08 January 2001 00:31, Richard Henderson wrote:
> > backtrace.c:7: Can't find a register in class `LINK_REGS' while reloading
> > `asm'.
>
> Reload knows that lr is in use.
>
> > +#define EPILOGUE_USES(REGNO) ((REGNO) == LINK_REGISTER_REGNUM)
>
> Add `reload_completed &&'
Ah yes, this fixes the glibc testcase. This should make the regression tester
a bit happier, it leaves g++.other/eh3.C as a regression and this one was
caused by Richard Kenner's patch on Dec30.
OK to commit if it passes bootstrap? I don't expect problems though, cause
without the reload_completed it passed even a RTL checking bootstrap.
Franz.
* config/rs6000/rs6000.h (EPILOGUE_USES): New, mark link register after
reload.
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/08 00:19:54
@@ -1559,6 +1559,14 @@ typedef struct rs6000_args
its backpointer, which we maintain. */
#define EXIT_IGNORE_STACK 1
+/* 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. */
+
+#define EPILOGUE_USES(REGNO) \
+ (reload_completed && (REGNO) == LINK_REGISTER_REGNUM)
+
/* 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