This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PING: Re: [PATCH] New -fstack-check implementation (1/n)
- From: "Raksit Ashok" <raksit at google dot com>
- To: "Eric Botcazou" <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 12 Jul 2008 20:43:58 -0700
- Subject: PING: Re: [PATCH] New -fstack-check implementation (1/n)
I am not the author of this patch, but I would love to see this new
-fstack-check functionality checked-in.
thanks,
raksit
On Fri, May 30, 2008 at 11:43 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> This is the first patch in a series that stems from the split of
> http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01853.html
>
> It's mostly infrastructure work but it does contain a few fixes to restore
> proper functioning of stack checking and remove a block of dead code.
> As per Mark's suggestion, I've removed the new option -fold-stack-check and
> instead added -fstack-check=[no|generic|specific] (better names welcome!).
>
> Tested on i586-suse-linux by verifying that this doesn't break anything.
> I cannot really do more since stack checking is still non-functional on the
> popular targets (most notably x86/Linux and x86-64/Linux) but this patch
> works fine in our 4.1 and 4.3 compilers. OK for mainline?
>
>
> 2008-05-30 Eric Botcazou <ebotcazou@adacore.com>
>
> PR ada/20548
> New stack checking implementation
> * 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/
> * decl.c (gnat_to_gnu_entity): Use DECL_SIZE_UNIT consistently in the
> setjmp test. Adjust for new behaviour of flag_stack_check.
> * utils2.c (build_call_alloc_dealloc): Remove redundant test of
> flag_stack_check. Adjust for new behaviour of flag_stack_check.
>
>
> --
> Eric Botcazou
>