From patchwork Wed May 30 08:51:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 161893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 966B7B6FF5 for ; Wed, 30 May 2012 18:54:31 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1338972871; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Subject:Date:User-Agent:MIME-Version:Message-Id: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=+0laUxT GJi+62gAZTF/+ogibPbI=; b=SN7+19Ne0x1OwEoFpErh6X5fxa8y+CwvmZDO0Bq hlCu7rIqOmfIAtNieOZ6/S539s0zMPSFeQtZ2jkIisJNnbvioh+g/0IhgYPalbCD UzLRmk8hPgq5rP/bXx/iNfBj7D3mo25VVtjORjsxzzC8P4dIELtSUiwmwSd7EuvI kcOw= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Subject:Date:User-Agent:MIME-Version:Message-Id:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=oaKhvv9gnCSOQjpDjdtRvV/yWkUmExe0/om+zPFTxtVXkykhd4Yd6O3TInfile lB1Gp8+AQR3PPPU/jK81DvyIjgEfRTLNYNOXt7dhE7AlbJNwwoYc2D+npUoSkLRX OtoJSvOFhKEXUV7pexIvc//2V24dHATK1I6oajHksEy5k=; Received: (qmail 6929 invoked by alias); 30 May 2012 08:54:09 -0000 Received: (qmail 6841 invoked by uid 22791); 30 May 2012 08:54:06 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 May 2012 08:53:50 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 1C44329005A for ; Wed, 30 May 2012 10:53:55 +0200 (CEST) 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 G6mi1q93IIPt for ; Wed, 30 May 2012 10:53:55 +0200 (CEST) Received: from [192.168.1.2] (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id C2F2E290044 for ; Wed, 30 May 2012 10:53:54 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Restore simple control flow in probe_stack_range Date: Wed, 30 May 2012 10:51:36 +0200 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Message-Id: <201205301051.36687.ebotcazou@adacore.com> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org It apparently got changed when the conversion to the new create_input_operand interface was done. This restores the simple control flow of 4.6.x and stops the compiler when the probe cannot be generated if HAVE_check_stack, instead of silently dropping it (but no architectures HAVE_check_stack so...). Tested on i586-suse-linux, applied on the mainline and 4.7 branch as obvious. 2012-05-30 Eric Botcazou * explow.c (probe_stack_range): Restore simple control flow and stop again when the probe cannot be generated if HAVE_check_stack. Index: explow.c =================================================================== --- explow.c (revision 187922) +++ explow.c (working copy) @@ -1579,12 +1579,11 @@ probe_stack_range (HOST_WIDE_INT first, size, first))); emit_library_call (stack_check_libfunc, LCT_NORMAL, VOIDmode, 1, addr, Pmode); - return; } /* Next see if we have an insn to check the stack. */ #ifdef HAVE_check_stack - if (HAVE_check_stack) + else if (HAVE_check_stack) { struct expand_operand ops[1]; rtx addr = memory_address (Pmode, @@ -1592,10 +1591,10 @@ probe_stack_range (HOST_WIDE_INT first, stack_pointer_rtx, plus_constant (Pmode, size, first))); - + bool success; create_input_operand (&ops[0], addr, Pmode); - if (maybe_expand_insn (CODE_FOR_check_stack, 1, ops)) - return; + success = maybe_expand_insn (CODE_FOR_check_stack, 1, ops); + gcc_assert (success); } #endif