Commit 06fc54dd by Eric Botcazou Committed by Eric Botcazou

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
parent 2fcd5884
2017-10-07 Eric Botcazou <ebotcazou@adacore.com>
* 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.
2017-10-07 Jan Hubicka <hubicka@ucw.cz>
* invoke.texi (Wsuggest-attribute=cold): Document.
......@@ -890,7 +890,11 @@ DEF_LIB_BUILTIN (BUILT_IN_REALLOC, "realloc", BT_FN_PTR_PTR_SIZE, ATTR_AL
DEF_GCC_BUILTIN (BUILT_IN_RETURN, "return", BT_FN_VOID_PTR, ATTR_NORETURN_NOTHROW_LEAF_LIST)
DEF_GCC_BUILTIN (BUILT_IN_RETURN_ADDRESS, "return_address", BT_FN_PTR_UINT, ATTR_LEAF_LIST)
DEF_GCC_BUILTIN (BUILT_IN_SAVEREGS, "saveregs", BT_FN_PTR_VAR, ATTR_NULL)
#ifdef DONT_USE_BUILTIN_SETJMP
DEF_LIB_BUILTIN (BUILT_IN_SETJMP, "setjmp", BT_FN_INT_PTR, ATTR_RT_NOTHROW_LEAF_LIST)
#else
DEF_GCC_BUILTIN (BUILT_IN_SETJMP, "setjmp", BT_FN_INT_PTR, ATTR_RT_NOTHROW_LEAF_LIST)
#endif
DEF_EXT_LIB_BUILTIN (BUILT_IN_STRFMON, "strfmon", BT_FN_SSIZE_STRING_SIZE_CONST_STRING_VAR, ATTR_FORMAT_STRFMON_NOTHROW_3_4)
DEF_LIB_BUILTIN (BUILT_IN_STRFTIME, "strftime", BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_TM_PTR, ATTR_FORMAT_STRFTIME_NOTHROW_3_0)
DEF_GCC_BUILTIN (BUILT_IN_TRAP, "trap", BT_FN_VOID, ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST)
......
......@@ -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
......
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