diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-22 11:31:56 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-22 11:31:56 +0000 |
commit | b2ee26d5ec4780a243a5a6bbeff15011ef7fc5a8 (patch) | |
tree | 869fe1a9b21d0e0d0899b90686c82c84b6ee0c49 /gcc/except.c | |
parent | 51836a0c4250a0f35401e4505d81444eb802a986 (diff) | |
download | gcc-b2ee26d5ec4780a243a5a6bbeff15011ef7fc5a8.tar.gz |
* function.c (expand_function_end): Do not emit a jump to the "naked"
return label for fall-through returns.
* except.c (sjlj_emit_function_exit): Always place the call to the
unregister function at the location installed by expand_function_end.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146570 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/gcc/except.c b/gcc/except.c index 5a04fa68a8e..bec73834e23 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1968,9 +1968,7 @@ sjlj_emit_function_exit_after (rtx after) static void sjlj_emit_function_exit (void) { - rtx seq; - edge e; - edge_iterator ei; + rtx seq, insn; start_sequence (); @@ -1984,31 +1982,11 @@ sjlj_emit_function_exit (void) post-dominates all can_throw_internal instructions. This is the last possible moment. */ - FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds) - if (e->flags & EDGE_FALLTHRU) - break; - if (e) - { - rtx insn; + insn = crtl->eh.sjlj_exit_after; + if (LABEL_P (insn)) + insn = NEXT_INSN (insn); - /* Figure out whether the place we are supposed to insert libcall - is inside the last basic block or after it. In the other case - we need to emit to edge. */ - gcc_assert (e->src->next_bb == EXIT_BLOCK_PTR); - for (insn = BB_HEAD (e->src); ; insn = NEXT_INSN (insn)) - { - if (insn == crtl->eh.sjlj_exit_after) - { - if (LABEL_P (insn)) - insn = NEXT_INSN (insn); - emit_insn_after (seq, insn); - return; - } - if (insn == BB_END (e->src)) - break; - } - insert_insn_on_edge (seq, e); - } + emit_insn_after (seq, insn); } static void |