Commit 36db6e56 authored by hainque's avatar hainque
Browse files

* config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p):

        If the current function calls eh_return, claim live all registers
        that we need to check for liveness otherwise.

        testsuite/
        * gcc.target/powerpc (ehreturn.c): New test.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165715 138bc75d-0d04-0410-961f-82ee72b054a4
parent 64cd9619
2010-10-20 Olivier Hainque <hainque@adacore.com>
* config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p):
If the current function calls eh_return, claim live all registers
that we need to check for liveness otherwise.
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
 
* c-decl.c (c_write_global_declarations): Call
......@@ -19690,7 +19690,12 @@ rs6000_make_savres_rtx (rs6000_stack_t *info,
static bool
rs6000_reg_live_or_pic_offset_p (int reg)
{
return ((df_regs_ever_live_p (reg)
/* If the function calls eh_return, claim used all the registers that would
be checked for liveness otherwise. This is required for the PIC offset
register with -mminimal-toc on AIX, as it is advertised as "fixed" for
register allocation purposes in this case. */
return (((crtl->calls_eh_return || df_regs_ever_live_p (reg))
&& (!call_used_regs[reg]
|| (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
&& TARGET_TOC && TARGET_MINIMAL_TOC)))
......
2010-10-20 Olivier Hainque <hainque@adacore.com>
* gcc.target/powerpc/ehreturn.c: New test.
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers. Test adapted to
......
/* { dg-do compile } */
/* { dg-options "-O2 -mminimal-toc -mno-multiple" } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
void foo ()
{
long l; void *p;
volatile int x;
__builtin_unwind_init ();
x = 12;
__builtin_eh_return (l, p);
}
/* { dg-final { scan-assembler "st\\[wd\\] 30," } } */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment