Commit d0edbeec by Kaz Kojima

re PR target/18032 ([4.0.0] SH: wrong code for EH)

	PR target/18032
	* config/sh/sh.c (sh_expand_epilogue): Emit a blockage insn before
	the frame pointer adjustment when exception handling is enabled.

From-SVN: r89333
parent 5acd0bed
2004-10-20 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/18032
* config/sh/sh.c (sh_expand_epilogue): Emit a blockage insn before
the frame pointer adjustment when exception handling is enabled.
2004-10-20 Kazu Hirata <kazu@cs.umass.edu> 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
* stor-layout.c: Fix a comment typo. * stor-layout.c: Fix a comment typo.
......
...@@ -5828,6 +5828,10 @@ sh_expand_epilogue (bool sibcall_p) ...@@ -5828,6 +5828,10 @@ sh_expand_epilogue (bool sibcall_p)
if (frame_pointer_needed) if (frame_pointer_needed)
{ {
/* We must avoid scheduling the epilogue with previous basic blocks
when exception handling is enabled. See PR/18032. */
if (flag_exceptions)
emit_insn (gen_blockage ());
output_stack_adjust (frame_size, frame_pointer_rtx, e, &live_regs_mask); output_stack_adjust (frame_size, frame_pointer_rtx, e, &live_regs_mask);
/* We must avoid moving the stack pointer adjustment past code /* We must avoid moving the stack pointer adjustment past code
......
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