From 9fdcdc749b18a96983ba060f35421147a7454bd5 Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Wed, 25 Mar 2009 22:23:27 +0000 Subject: [PATCH] re PR target/39523 (SH: global registers are wrongly saved) PR target/39523 * config/sh/sh.c (calc_live_regs): Fix condition for global registers except PIC_OFFSET_TABLE_REGNUM. From-SVN: r145077 --- gcc/ChangeLog | 6 ++++++ gcc/config/sh/sh.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b7d9028a860..7d9fe815e35b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-03-25 Kaz Kojima + + PR target/39523 + * config/sh/sh.c (calc_live_regs): Fix condition for global + registers except PIC_OFFSET_TABLE_REGNUM. + 2009-03-25 Kai Tietz PR/39518 diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 3c57730b83eb..c8f4c85ee759 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -5966,7 +5966,9 @@ calc_live_regs (HARD_REG_SET *live_regs_mask) && crtl->args.info.call_cookie && reg == PIC_OFFSET_TABLE_REGNUM) || (df_regs_ever_live_p (reg) - && (!call_really_used_regs[reg] + && ((!call_really_used_regs[reg] + && !(reg != PIC_OFFSET_TABLE_REGNUM + && fixed_regs[reg] && call_used_regs[reg])) || (trapa_handler && reg == FPSCR_REG && TARGET_FPU_ANY))) || (crtl->calls_eh_return && (reg == EH_RETURN_DATA_REGNO (0) -- 2.43.5