From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28105 invoked by alias); 13 Dec 2009 23:02:11 -0000 Received: (qmail 27926 invoked by uid 22791); 13 Dec 2009 23:02:10 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 13 Dec 2009 23:02:05 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 03D0A29000C; Mon, 14 Dec 2009 00:02:03 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kJ2qWFDfjT2t; Mon, 14 Dec 2009 00:02:02 +0100 (CET) Received: from [192.168.1.2] (83-155-198-156.rev.libertysurf.net [83.155.198.156]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 2510B29000A; Mon, 14 Dec 2009 00:02:02 +0100 (CET) From: Eric Botcazou To: Ian Lance Taylor Subject: Re: [Patch] New -fstack-check implementation (2/n) Date: Sun, 13 Dec 2009 23:25:00 -0000 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) Cc: gcc-patches@gcc.gnu.org References: <200908041337.11922.ebotcazou@adacore.com> <200910291747.57447.ebotcazou@adacore.com> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200912140005.11240.ebotcazou@adacore.com> Content-Type: Multipart/Mixed; boundary="Boundary-00=_nMXJLVL8fPd3Sxu" 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-12/txt/msg00681.txt.bz2 --Boundary-00=_nMXJLVL8fPd3Sxu Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 659 > The middle-end parts are OK. This is OK if it is OK with the x86 > backend maintainers. It just occured to me that, with the addition of the probe_stack insn, the STACK_CHECK_PROBE_LOAD macro has become superfluous since you now can define your own stack probing insn. Moreover no port defines it. So I've installed as obvious the attached patch that gets rid of it. 2009-12-13 Eric Botcazou * doc/tm.texi (STACK_CHECK_PROBE_LOAD): Delete. * expr.h (STACK_CHECK_PROBE_LOAD): Likewise. * explow.c (emit_stack_probe): Do not test STACK_CHECK_PROBE_LOAD. * system.h (STACK_CHECK_PROBE_LOAD): Poison. -- Eric Botcazou --Boundary-00=_nMXJLVL8fPd3Sxu Content-Type: text/x-diff; charset="iso-8859-1"; name="p.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p.diff" Content-length: 2664 Index: doc/tm.texi =================================================================== --- doc/tm.texi (revision 155123) +++ doc/tm.texi (working copy) @@ -3564,12 +3564,6 @@ the ``guard pages'' at the end of a stac of 12 (4096-byte interval) is suitable for most systems. @end defmac -@defmac STACK_CHECK_PROBE_LOAD -An integer which is nonzero if GCC should perform the stack probe -as a load instruction and zero if GCC should use a store instruction. -The default is zero, which is the most efficient choice on most systems. -@end defmac - @defmac STACK_CHECK_MOVING_SP An integer which is nonzero if GCC should move the stack pointer page by page when doing probes. This can be necessary on systems where the stack pointer Index: expr.h =================================================================== --- expr.h (revision 155123) +++ expr.h (working copy) @@ -223,11 +223,6 @@ do { \ #define STACK_CHECK_PROBE_INTERVAL_EXP 12 #endif -/* The default is to do a store into the stack. */ -#ifndef STACK_CHECK_PROBE_LOAD -#define STACK_CHECK_PROBE_LOAD 0 -#endif - /* The default is not to move the stack pointer. */ #ifndef STACK_CHECK_MOVING_SP #define STACK_CHECK_MOVING_SP 0 Index: explow.c =================================================================== --- explow.c (revision 155123) +++ explow.c (working copy) @@ -1366,9 +1366,6 @@ emit_stack_probe (rtx address) emit_insn (gen_probe_stack (memref)); else #endif - if (STACK_CHECK_PROBE_LOAD) - emit_move_insn (gen_reg_rtx (word_mode), memref); - else emit_move_insn (memref, const0_rtx); } Index: system.h =================================================================== --- system.h (revision 155123) +++ system.h (working copy) @@ -756,12 +756,12 @@ extern void fancy_abort (const char *, i TARGET_ESC TARGET_FF TARGET_NEWLINE TARGET_TAB TARGET_VT \ LINK_LIBGCC_SPECIAL DONT_ACCESS_GBLS_AFTER_EPILOGUE \ TARGET_OPTIONS TARGET_SWITCHES EXTRA_CC_MODES FINALIZE_PIC \ - PREDICATE_CODES SPECIAL_MODE_PREDICATES \ + PREDICATE_CODES SPECIAL_MODE_PREDICATES UNALIGNED_WORD_ASM_OP \ EXTRA_SECTIONS EXTRA_SECTION_FUNCTIONS READONLY_DATA_SECTION \ TARGET_ASM_EXCEPTION_SECTION TARGET_ASM_EH_FRAME_SECTION \ SMALL_ARG_MAX ASM_OUTPUT_SHARED_BSS ASM_OUTPUT_SHARED_COMMON \ - ASM_OUTPUT_SHARED_LOCAL UNALIGNED_WORD_ASM_OP \ - ASM_MAKE_LABEL_LINKONCE STACK_CHECK_PROBE_INTERVAL + ASM_OUTPUT_SHARED_LOCAL ASM_MAKE_LABEL_LINKONCE \ + STACK_CHECK_PROBE_INTERVAL STACK_CHECK_PROBE_LOAD /* Hooks that are no longer used. */ #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \ --Boundary-00=_nMXJLVL8fPd3Sxu--