summaryrefslogtreecommitdiffstats
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-21 01:11:31 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-21 01:11:31 +0000
commit615166bb45272b0ad86b04ff1a7d65770ed5f4f9 (patch)
treeffba52aed7e19dec753b233566b9ab484e11d29e /gcc/stmt.c
parent4e8b9dce686f20aa5ba3bfc67afc0725adff1694 (diff)
downloadppe42-gcc-615166bb45272b0ad86b04ff1a7d65770ed5f4f9.tar.gz
ppe42-gcc-615166bb45272b0ad86b04ff1a7d65770ed5f4f9.zip
* rtl.h (REG_NON_LOCAL_GOTO): New.
* rtl.c (reg_note_name): Update. * stmt.c (expand_goto): Emit a REG_NON_LOCAL_GOTO note. * builtins.c (expand_builtin_longjmp): Likewise. * flow.c (make_edges): Check for REG_NON_LOCAL_GOTO and do not emit an edge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38408 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index d4b047c9a9c..7489613fa40 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -783,7 +783,7 @@ expand_goto (label)
{
struct function *p = find_function_data (context);
rtx label_ref = gen_rtx_LABEL_REF (Pmode, label_rtx (label));
- rtx handler_slot, static_chain, save_area;
+ rtx handler_slot, static_chain, save_area, insn;
tree link;
/* Find the corresponding handler slot for this label. */
@@ -836,6 +836,15 @@ expand_goto (label)
emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
emit_indirect_jump (handler_slot);
}
+
+ /* Search backwards to the jump insn and mark it as a
+ non-local goto. */
+ for (insn = get_last_insn ();
+ GET_CODE (insn) != JUMP_INSN;
+ insn = PREV_INSN (insn))
+ continue;
+ REG_NOTES (insn) = alloc_EXPR_LIST (REG_NON_LOCAL_GOTO, const0_rtx,
+ REG_NOTES (insn));
}
else
expand_goto_internal (label, label_rtx (label), NULL_RTX);
OpenPOWER on IntegriCloud