Commit 553130b0 by Nick Clifton Committed by Nick Clifton

rl78.c (rl78_expand_epilogue): Generate a USE of the pop'ed registers so that…

rl78.c (rl78_expand_epilogue): Generate a USE of the pop'ed registers so that DCE does not eliminate them.

	* config/rl78/rl78.c (rl78_expand_epilogue): Generate a USE of the
	pop'ed registers so that DCE does not eliminate them.

From-SVN: r215375
parent 9d8fc086
2014-09-19 Nick Clifton <nickc@redhat.com>
* config/rl78/rl78.c (rl78_expand_epilogue): Generate a USE of the
pop'ed registers so that DCE does not eliminate them.
2014-09-18 Jan Hubicka <hubicka@ucw.cz>
PR lto/63298
......@@ -1136,10 +1136,19 @@ rl78_expand_epilogue (void)
for (i = 15; i >= 0; i--)
if (cfun->machine->need_to_push [i])
{
rtx dest = gen_rtx_REG (HImode, i * 2);
if (TARGET_G10)
{
emit_insn (gen_pop (gen_rtx_REG (HImode, 0)));
emit_move_insn (gen_rtx_REG (HImode, i*2), gen_rtx_REG (HImode, 0));
rtx ax = gen_rtx_REG (HImode, 0);
emit_insn (gen_pop (ax));
if (i != 0)
{
emit_move_insn (dest, ax);
/* Generate a USE of the pop'd register so that DCE will not eliminate the move. */
emit_insn (gen_use (dest));
}
}
else
{
......@@ -1150,7 +1159,7 @@ rl78_expand_epilogue (void)
emit_insn (gen_sel_rb (GEN_INT (need_bank)));
rb = need_bank;
}
emit_insn (gen_pop (gen_rtx_REG (HImode, i * 2)));
emit_insn (gen_pop (dest));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment