diff options
author | Olivier Hainque <hainque@adacore.com> | 2010-10-20 10:09:41 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2010-10-20 10:09:41 +0000 |
commit | 73dd5ce0c3b7d284d7ea9e6ee6f60b8ad4f9af3c (patch) | |
tree | 1805a0002373d4736208fc681705450697dda9a6 /gcc/config/rs6000 | |
parent | 977e30bc45295e5c53967dc1a291fb93fe817a2a (diff) | |
download | gcc-73dd5ce0c3b7d284d7ea9e6ee6f60b8ad4f9af3c.tar.gz |
rs6000.c (rs6000_reg_live_or_pic_offset_p): If the current function calls eh_return...
* 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.
From-SVN: r165715
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 69c3969b451..9469d45c10e 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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))) |