From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26543 invoked by alias); 31 Oct 2009 00:57:28 -0000 Received: (qmail 26535 invoked by uid 22791); 31 Oct 2009 00:57:27 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 31 Oct 2009 00:57:22 +0000 Received: from spaceape11.eur.corp.google.com (spaceape11.eur.corp.google.com [172.28.16.145]) by smtp-out.google.com with ESMTP id n9V0vJat030426 for ; Sat, 31 Oct 2009 00:57:20 GMT Received: from yxe5 (yxe5.prod.google.com [10.190.2.5]) by spaceape11.eur.corp.google.com with ESMTP id n9V0vHBI027718 for ; Fri, 30 Oct 2009 17:57:17 -0700 Received: by yxe5 with SMTP id 5so3258318yxe.24 for ; Fri, 30 Oct 2009 17:57:16 -0700 (PDT) Received: by 10.91.171.4 with SMTP id y4mr5877167ago.116.1256950636740; Fri, 30 Oct 2009 17:57:16 -0700 (PDT) Received: from coign.google.com ([67.218.103.182]) by mx.google.com with ESMTPS id 35sm1592896yxh.69.2009.10.30.17.57.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 30 Oct 2009 17:57:14 -0700 (PDT) To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Subject: Re: [Patch] New -fstack-check implementation (2/n) References: <200908041337.11922.ebotcazou@adacore.com> <200909300112.32829.ebotcazou@adacore.com> <200910291747.57447.ebotcazou@adacore.com> From: Ian Lance Taylor Date: Sat, 31 Oct 2009 03:07:00 -0000 In-Reply-To: <200910291747.57447.ebotcazou@adacore.com> (Eric Botcazou's message of "Thu\, 29 Oct 2009 17\:47\:57 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg01831.txt.bz2 Eric Botcazou writes: > 2009-10-29 Eric Botcazou > > PR target/10127 > PR ada/20548 > * expr.h (STACK_CHECK_PROBE_INTERVAL): Delete. > (STACK_CHECK_PROBE_INTERVAL_EXP): New macro. > (STACK_CHECK_MOVING_SP): Likewise. > * system.h (STACK_CHECK_PROBE_INTERVAL): Poison it. > * doc/tm.texi (Stack Checking): Delete STACK_CHECK_PROBE_INTERVAL. > Document STACK_CHECK_PROBE_INTERVAL_EXP and STACK_CHECK_MOVING_SP. > * explow.c (anti_adjust_stack_and_probe): New function. > (allocate_dynamic_stack_space): Do not directly allocate space if > STACK_CHECK_MOVING_SP, instead invoke above function. > (emit_stack_probe): Handle probe_stack insn. > (PROBE_INTERVAL): New macro. > (STACK_GROW_OPTAB): Likewise. > (STACK_HIGH, STACK_LOW): Likewise. > (probe_stack_range): Remove support code for dedicated pattern. Fix > loop condition in the small constant case. Rewrite in the general > case to be immune to wraparounds. Make sure the address of probes > is valid. Try to use [base + disp] addressing mode if possible. > * ira.c (setup_eliminable_regset): Set frame_pointer_needed if stack > checking is enabled and STACK_CHECK_MOVING_SP. > * rtlanal.c (may_trap_p_1) : If stack checking is enabled, > return 1 for volatile references to the stack pointer. > * tree.c (build_common_builtin_nodes): Do not set ECF_NOTHROW on > __builtin_alloca if stack checking is enabled. > * unwind-dw2.c (uw_identify_context): Take into account whether the > context is that of a signal frame or not. > * config/i386/linux-unwind.h (x86_frob_update_context): New function. > (MD_FROB_UPDATE_CONTEXT): Define. > * config/i386/linux.h (STACK_CHECK_STATIC_BUILTIN): Likewise. > (STACK_CHECK_MOVING_SP): Likewise. > * config/i386/linux64.h (STACK_CHECK_STATIC_BUILTIN): Likewise. > (STACK_CHECK_MOVING_SP): Likewise. > * config/i386/sol2.h (STACK_CHECK_STATIC_BUILTIN): Likewise. > * config/i386/i386.c (ix86_compute_frame_layout): Force use of push > instructions to save registers if stack checking with probes is on. > (get_scratch_register_on_entry): New function. > (release_scratch_register_on_entry): Likewise. > (output_probe_op): Likewise. > (output_adjust_stack_and_probe_op): Likewise. > (output_adjust_stack_and_probe): Likewise. > (ix86_gen_adjust_stack_and_probe): Likewise. > (ix86_adjust_stack_and_probe): Likewise. > (output_probe_stack_range_op): Likewise. > (ix86_gen_probe_stack_range): Likewise > (ix86_emit_probe_stack_range): Likewise. > (ix86_expand_prologue): Emit stack checking code if static builtin > stack checking is enabled. > * config/i386/i386-protos.h (output_adjust_stack_and_probe): Declare. > (output_probe_stack_range): Likewise. > * config/i386/i386.md (UNSPECV_STACK_PROBE_INLINE): New constant. > (probe_stack): New expander. > (adjust_stack_and_probe): New insn. > (probe_stack_range): Likewise. > (logical operation peepholes): Do not split stack checking probes. The middle-end parts are OK. This is OK if it is OK with the x86 backend maintainers. Thanks. Ian