From edbb33c7958d9ebb202f8dbfa84901e0b6d5ef7a Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 6 May 2015 10:19:07 +0000 Subject: [PATCH] rl78.c (need_to_save): Save register 22 if it is used, even if it is not being used as a frame pointer. * config/rl78/rl78.c (need_to_save): Save register 22 if it is used, even if it is not being used as a frame pointer. From-SVN: r222845 --- gcc/ChangeLog | 5 +++++ gcc/config/rl78/rl78.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc88220cc83..2593a3c7f99 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-05-06 Nick Clifton + + * config/rl78/rl78.c (need_to_save): Save register 22 if it is + used, even if it is not being used as a frame pointer. + 2015-05-05 Jason Merrill * dwarf2out.c (gen_member_die): Don't emit anything for an diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c index 0ca5515f84e..48318931404 100644 --- a/gcc/config/rl78/rl78.c +++ b/gcc/config/rl78/rl78.c @@ -687,7 +687,8 @@ need_to_save (unsigned int regno) return df_regs_ever_live_p (regno); } - if (regno == FRAME_POINTER_REGNUM && frame_pointer_needed) + if (regno == FRAME_POINTER_REGNUM + && (frame_pointer_needed || df_regs_ever_live_p (regno))) return true; if (fixed_regs[regno]) return false; -- 2.30.2