From: Nick Clifton Date: Wed, 6 May 2015 10:19:07 +0000 (+0000) Subject: rl78.c (need_to_save): Save register 22 if it is used, even if it is not being used... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=edbb33c7958d9ebb202f8dbfa84901e0b6d5ef7a;p=gcc.git 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 --- 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;