From 4f6c213142e5ce6f5ee17ef5d0f1cb85cd0ff573 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 29 Sep 2006 06:32:58 +0000 Subject: builtins.c (expand_builtin_setjmp): Delete. * builtins.c (expand_builtin_setjmp): Delete. (expand_builtin) : Mark as unreachable. : New case. : Likewise. : Likewise. * builtins.def (BUILT_IN_SETJMP_SETUP): New built-in stub. (BUILT_IN_SETJMP_DISPATCHER): Likewise. (BUILT_IN_SETJMP_RECEIVER): Likewise. * gimple-low.c (struct lower_data): New field calls_builtin_setjmp. (lower_function_body): Initialize it to false. If it is set to true at the end of the processing, emit the setjmp dispatcher. (lower_stmt) : Invoke lower_builtin_setjmp if the callee is __builtin_setjmp and set calls_builtin_setjmp to true as well. : Fall through to above case if there is a CALL_EXPR on the rhs of the assignment. (lower_builtin_setjmp): New function. * tree.c (build_common_builtin_nodes): Build BUILT_IN_SETJMP_SETUP, BUILT_IN_SETJMP_DISPATCHER and BUILT_IN_SETJMP_RECEIVER nodes. * tree-cfg.c (make_exit_edges) : Use specific predicate to detect calls that can go to non-local labels. Use specific helper to create the abnormal edges associated with them. : Likewise. (make_abnormal_goto_edges): New function extracted from... (make_goto_expr_edges): ...here. Call it for computed gotos. (simple_goto_p): Minor tweak. (tree_can_make_abnormal_goto): New predicate. (tree_redirect_edge_and_branch): Return zero on all abnormal edges. (tree_purge_dead_abnormal_call_edges): New function. * tree-flow.h (tree_can_make_abnormal_goto): Declare. (tree_purge_dead_abnormal_call_edges): Likewise. (make_abnormal_goto_edges): Likewise. * tree-inline.c (expand_call_inline): Simplify statement frobbing. Purge all dead abnormal edges if the call was in the last statement. * tree-optimize.c (has_abnormal_outgoing_edge_p): New predicate. (execute_fixup_cfg): If there are non-local labels in the function, scan the basic blocks and split them at calls that can go to non-local labels or add missing abnormal call edges. Write down the CFG in the dump file. (pass_fixup_cfg): Remove TODO_dump_func flag. * unwind-sjlj.c: Poison setjmp. * doc/install.texi (enable-sjlj-exceptions): Use more general wording. * doc/tm.texi (DWARF2_UNWIND_INFO): Likewise. (TARGET_UNWIND_TABLES_DEFAULT): Fix typo. (DONT_USE_BUILTIN_SETJMP): Document it. From-SVN: r117298 --- gcc/unwind-sjlj.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/unwind-sjlj.c') diff --git a/gcc/unwind-sjlj.c b/gcc/unwind-sjlj.c index 72c363c..e1a62c9 100644 --- a/gcc/unwind-sjlj.c +++ b/gcc/unwind-sjlj.c @@ -1,5 +1,5 @@ /* SJLJ exception handling and frame unwind runtime interface routines. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of GCC. @@ -45,10 +45,14 @@ typedef void *jmp_buf[JMP_BUF_SIZE]; extern void longjmp(jmp_buf, int) __attribute__((noreturn)); #endif #else -#define setjmp __builtin_setjmp #define longjmp __builtin_longjmp #endif +/* The setjmp side is dealt with in the except.c file. */ +#undef setjmp +#define setjmp setjmp_should_not_be_used_in_this_file + + /* This structure is allocated on the stack of the target function. This must match the definition created in except.c:init_eh. */ struct SjLj_Function_Context -- cgit v1.1