diff options
author | DJ Delorie <dj@redhat.com> | 2013-09-12 18:43:30 -0400 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2013-09-12 18:43:30 -0400 |
commit | 17b2557c8348c79c6f1a4d6c3a46114011739eff (patch) | |
tree | e6649283fb5338b08ab35ddda268b111d9d90636 /gcc | |
parent | 984417a0ae5aec2b3ef771b52d9d41b01c77ff02 (diff) | |
download | gcc-17b2557c8348c79c6f1a4d6c3a46114011739eff.zip gcc-17b2557c8348c79c6f1a4d6c3a46114011739eff.tar.gz gcc-17b2557c8348c79c6f1a4d6c3a46114011739eff.tar.bz2 |
rl78.c (rl78_expand_prologue): Use AX to copy between SP and FP.
* config/rl78/rl78.c (rl78_expand_prologue): Use AX to copy
between SP and FP.
(rl78_expand_epilogue): Likewise.
From-SVN: r202542
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rl78/rl78.c | 12 |
2 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 91dba09..5dc8ed0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-09-12 DJ Delorie <dj@redhat.com> + + * config/rl78/rl78.c (rl78_expand_prologue): Use AX to copy + between SP and FP. + (rl78_expand_epilogue): Likewise. + 2013-09-12 Vladimir Makarov <vmakarov@redhat.com> PR middle-end/58335 diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c index cd9010a..3f13955 100644 --- a/gcc/config/rl78/rl78.c +++ b/gcc/config/rl78/rl78.c @@ -1036,8 +1036,12 @@ rl78_expand_prologue (void) emit_insn (gen_sel_rb (GEN_INT (0))); if (frame_pointer_needed) - F (emit_move_insn (gen_rtx_REG (HImode, FRAME_POINTER_REGNUM), - gen_rtx_REG (HImode, STACK_POINTER_REGNUM))); + { + F (emit_move_insn (gen_rtx_REG (HImode, AX_REG), + gen_rtx_REG (HImode, STACK_POINTER_REGNUM))); + F (emit_move_insn (gen_rtx_REG (HImode, FRAME_POINTER_REGNUM), + gen_rtx_REG (HImode, AX_REG))); + } fs = cfun->machine->framesize_locals + cfun->machine->framesize_outgoing; while (fs > 0) @@ -1061,8 +1065,10 @@ rl78_expand_epilogue (void) if (frame_pointer_needed) { - emit_move_insn (gen_rtx_REG (HImode, STACK_POINTER_REGNUM), + emit_move_insn (gen_rtx_REG (HImode, AX_REG), gen_rtx_REG (HImode, FRAME_POINTER_REGNUM)); + emit_move_insn (gen_rtx_REG (HImode, STACK_POINTER_REGNUM), + gen_rtx_REG (HImode, AX_REG)); } else { |