Commit d660cefe by Richard Sandiford Committed by Richard Sandiford

final.c (final_scan_insn): Apply the effects of frame-related delay slot insns…

final.c (final_scan_insn): Apply the effects of frame-related delay slot insns before emitting a delayed...

	* final.c (final_scan_insn): Apply the effects of frame-related
	delay slot insns before emitting a delayed branch.

From-SVN: r66774
parent c1f1978f
2003-05-13 Richard Sandiford <rsandifo@redhat.com>
* final.c (final_scan_insn): Apply the effects of frame-related
delay slot insns before emitting a delayed branch.
2003-05-13 Nick Clifton <nickc@redhat.com> 2003-05-13 Nick Clifton <nickc@redhat.com>
* config/mcore/mcore.md (jump): Use emit_jump_insn. * config/mcore/mcore.md (jump): Use emit_jump_insn.
......
...@@ -2160,6 +2160,14 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ...@@ -2160,6 +2160,14 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
break; break;
final_sequence = body; final_sequence = body;
/* Record the delay slots' frame information before the branch.
This is needed for delayed calls: see execute_cfa_program(). */
#if defined (DWARF2_UNWIND_INFO)
if (dwarf2out_do_frame ())
for (i = 1; i < XVECLEN (body, 0); i++)
dwarf2out_frame_debug (XVECEXP (body, 0, i));
#endif
/* The first insn in this SEQUENCE might be a JUMP_INSN that will /* The first insn in this SEQUENCE might be a JUMP_INSN that will
force the restoration of a comparison that was previously force the restoration of a comparison that was previously
thought unnecessary. If that happens, cancel this sequence thought unnecessary. If that happens, cancel this sequence
...@@ -2514,17 +2522,18 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ...@@ -2514,17 +2522,18 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
output_asm_insn (template, recog_data.operand); output_asm_insn (template, recog_data.operand);
/* If necessary, report the effect that the instruction has on
the unwind info. We've already done this for delay slots
and call instructions. */
#if defined (DWARF2_UNWIND_INFO) #if defined (DWARF2_UNWIND_INFO)
#if defined (HAVE_prologue) if (GET_CODE (insn) == INSN
if (GET_CODE (insn) == INSN && dwarf2out_do_frame ()) #if !defined (HAVE_prologue)
dwarf2out_frame_debug (insn); && !ACCUMULATE_OUTGOING_ARGS
#else #endif
if (!ACCUMULATE_OUTGOING_ARGS && final_sequence == 0
&& GET_CODE (insn) == INSN
&& dwarf2out_do_frame ()) && dwarf2out_do_frame ())
dwarf2out_frame_debug (insn); dwarf2out_frame_debug (insn);
#endif #endif
#endif
#if 0 #if 0
/* It's not at all clear why we did this and doing so interferes /* It's not at all clear why we did this and doing so interferes
......
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