aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2017-10-07 22:17:16 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2017-10-07 22:17:16 +0000
commit06fc54dd64ad01755a95c0f44bcdd344be1f19d6 (patch)
treed5420a2ce2b9fcdfc0cbfa310180030dd78052d0 /gcc/except.c
parent2fcd5884177d490c5cdc36464bd6b0a3bc4e8d54 (diff)
downloadgcc-06fc54dd64ad01755a95c0f44bcdd344be1f19d6.zip
gcc-06fc54dd64ad01755a95c0f44bcdd344be1f19d6.tar.gz
gcc-06fc54dd64ad01755a95c0f44bcdd344be1f19d6.tar.bz2
builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead of GCC builtin if...
* builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined. * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is defined, force the creation of a new block for a dispatch label. From-SVN: r253515
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c
index 10b5a7c..4991e7b 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1209,6 +1209,28 @@ sjlj_emit_function_enter (rtx_code_label *dispatch_label)
fn_begin_outside_block = false;
}
+#ifdef DONT_USE_BUILTIN_SETJMP
+ if (dispatch_label)
+ {
+ /* The sequence contains a branch in the middle so we need to force
+ the creation of a new basic block by means of BB_SUPERBLOCK. */
+ if (fn_begin_outside_block)
+ {
+ basic_block bb
+ = split_edge (single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
+ if (JUMP_P (BB_END (bb)))
+ emit_insn_before (seq, BB_END (bb));
+ else
+ emit_insn_after (seq, BB_END (bb));
+ }
+ else
+ emit_insn_after (seq, fn_begin);
+
+ single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun))->flags |= BB_SUPERBLOCK;
+ return;
+ }
+#endif
+
if (fn_begin_outside_block)
insert_insn_on_edge (seq, single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
else