diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-16 18:40:57 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-16 18:40:57 +0000 |
commit | 4852b82934092d13e2b3e1a183a789e5e97f6729 (patch) | |
tree | 4ab818c332a67c5a5e24c9d78cedd1099ebc04e2 /gcc/flags.h | |
parent | 5ca16c548b7739e67ec4adc9a5ce233613eeb9d4 (diff) | |
download | gcc-4852b82934092d13e2b3e1a183a789e5e97f6729.tar.gz |
PR ada/20548
* common.opt (-fstack-check): Do not declare the variable here.
(-fstack-check=): New option variant.
* doc/invoke.texi (Code Gen Options): Document it.
* expr.h (STACK_OLD_CHECK_PROTECT): New macro.
(STACK_CHECK_PROTECT): Bump to 3 pages if DWARF-2 EH is used.
(STACK_CHECK_STATIC_BUILTIN): New macro.
* doc/tm.texi (Stack Checking): Document STACK_CHECK_STATIC_BUILTIN.
* opts.c: Include expr.h.
(common_handle_option) <OPT_fold_stack_check_>: New case.
<OPT_fstack_check>: Likewise.
* calls.c (initialize_argument_information): Use TYPE_SIZE_UNIT
consistently in the test for variable-sized types. Adjust for
new behaviour of flag_stack_check.
* explow.c: Include except.h.
(allocate_dynamic_stack_space): Do not take into account
STACK_CHECK_MAX_FRAME_SIZE for static builtin stack checking.
* function.c (gimplify_parameters): Use DECL_SIZE_UNIT in the test
for variable-sized parameters. Treat all parameters whose size is
greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized if generic
stack checking is enabled.
* gimplify.c (gimplify_decl_expr): Treat non-static objects whose
size is greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized
if generic stack checking is enabled.
(expand_function_end): Adjust for new behaviour of flag_stack_check.
* reload1.c (reload): Likewise.
* stmt.c (expand_decl): Assert that all automatic variables have
fixed size at this point and remove dead code.
* flags.h (stack_check_type): New enumeration type.
(flag_stack_check): Declare.
* toplev.c (flag_stack_check): New global variable.
* Makefile.in (opts.o): Add dependency on EXPR_H.
(explow.o): Add dependency on except.h.
ada/
* gcc-interface/decl.c (gnat_to_gnu_entity): Use DECL_SIZE_UNIT in the
setjmp test consistently. Adjust for new behaviour of flag_stack_check.
* gcc-interface/utils2.c (build_call_alloc_dealloc): Remove redundant
test of flag_stack_check. Adjust for new behaviour of flag_stack_check.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139159 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/flags.h')
-rw-r--r-- | gcc/flags.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/flags.h b/gcc/flags.h index cfd278f747e..1de81f8e13b 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -254,6 +254,27 @@ extern int flag_var_tracking; warning message in case flag was set by -fprofile-{generate,use}. */ extern bool flag_speculative_prefetching_set; +/* Type of stack check. */ +enum stack_check_type +{ + /* Do not check the stack. */ + NO_STACK_CHECK = 0, + + /* Check the stack generically, i.e. assume no specific support + from the target configuration files. */ + GENERIC_STACK_CHECK, + + /* Check the stack and rely on the target configuration files to + check the static frame of functions, i.e. use the generic + mechanism only for dynamic stack allocations. */ + STATIC_BUILTIN_STACK_CHECK, + + /* Check the stack and entirely rely on the target configuration + files, i.e. do not use the generic mechanism at all. */ + FULL_BUILTIN_STACK_CHECK +}; +extern enum stack_check_type flag_stack_check; + /* Returns TRUE if generated code should match ABI version N or greater is in use. */ |