diff options
| author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-13 18:51:57 +0000 |
|---|---|---|
| committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-13 18:51:57 +0000 |
| commit | 6971805a001c9f86f14f6e80f88ae062eb547f86 (patch) | |
| tree | d6bd15f241c968e3ac3a15ebab8d1ffb932214a6 | |
| parent | 415ceb1ae7c8f893c9dfef3503d40a2edfa02a2f (diff) | |
| download | ppe42-gcc-6971805a001c9f86f14f6e80f88ae062eb547f86.tar.gz ppe42-gcc-6971805a001c9f86f14f6e80f88ae062eb547f86.zip | |
* final.c (final_scan_insn): Apply the effects of frame-related
delay slot insns before emitting a delayed branch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66774 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/final.c | 23 |
2 files changed, 21 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9f3a51f3c89..0fac8ca2964 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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> * config/mcore/mcore.md (jump): Use emit_jump_insn. diff --git a/gcc/final.c b/gcc/final.c index 86b0b2f6f41..0907411efbe 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2160,6 +2160,14 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) break; 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 force the restoration of a comparison that was previously thought unnecessary. If that happens, cancel this sequence @@ -2514,17 +2522,18 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) 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 (HAVE_prologue) - if (GET_CODE (insn) == INSN && dwarf2out_do_frame ()) - dwarf2out_frame_debug (insn); -#else - if (!ACCUMULATE_OUTGOING_ARGS - && GET_CODE (insn) == INSN + if (GET_CODE (insn) == INSN +#if !defined (HAVE_prologue) + && !ACCUMULATE_OUTGOING_ARGS +#endif + && final_sequence == 0 && dwarf2out_do_frame ()) dwarf2out_frame_debug (insn); #endif -#endif #if 0 /* It's not at all clear why we did this and doing so interferes |

