From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21531 invoked by alias); 28 Nov 2008 16:31:38 -0000 Received: (qmail 21521 invoked by uid 22791); 28 Nov 2008 16:31:37 -0000 X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.170) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Nov 2008 16:30:41 +0000 Received: by wf-out-1314.google.com with SMTP id 25so1455126wfc.14 for ; Fri, 28 Nov 2008 08:30:38 -0800 (PST) Received: by 10.142.158.17 with SMTP id g17mr3417317wfe.21.1227889838704; Fri, 28 Nov 2008 08:30:38 -0800 (PST) Received: from lucon.org (adsl-75-61-137-0.dsl.pltn13.sbcglobal.net [75.61.137.0]) by mx.google.com with ESMTPS id 30sm1351337wfg.25.2008.11.28.08.30.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 28 Nov 2008 08:30:37 -0800 (PST) Received: by lucon.org (Postfix, from userid 500) id 8C3E646EEC0; Fri, 28 Nov 2008 08:30:35 -0800 (PST) Date: Fri, 28 Nov 2008 17:58:00 -0000 To: "Kaveh R. GHAZI" Cc: Andrew Pinski , Jack Howarth , Uros Bizjak , "Ye, Joey" , "Guo, Xuepeng" , GCC Patches Subject: Re: PING: PATCH: PR middle-end/37843:[4.4 Regression] unaligned stack in maindue to tail call optimizatiP Message-ID: <20081128163035.GA4691@lucon.org> References: <4911CE8E.60501@gmail.com> <6dc9ffc80811051006r5a4c4882lf7584185bb1b6645@mail.gmail.com> <20081126145008.GA17083@lucon.org> <20081126173418.GA8864@bromo.med.uc.edu> <6dc9ffc80811261002g3dfefbcdofffb589d661931e1@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) From: "H.J. Lu" 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: 2008-11/txt/msg01455.txt.bz2 On Fri, Nov 28, 2008 at 10:49:16AM -0500, Kaveh R. GHAZI wrote: > On Wed, 26 Nov 2008, Andrew Pinski wrote: > > > On Wed, Nov 26, 2008 at 10:02 AM, H.J. Lu wrote: > > >>> > > >>> Darwin doesn't support sibcall. I am checking it to mark them Linux > > >>> only. > > >>> H.J. > > >> > > > static bool > > > ix86_function_ok_for_sibcall (tree decl, tree exp) > > > { > > > tree func; > > > rtx a, b; > > > > > > /* If we are generating position-independent code, we cannot sibcall > > > optimize any indirect call, or a direct call to a global function, > > > as the PLT requires %ebx be live. */ > > > if (!TARGET_64BIT && flag_pic && (!decl || !targetm.binds_local_p (decl))) > > > return false; > > > > > > Darwin returns false. > > > > > > > Because darwin is always pic though binds_local_p should return true ... > > -- Pinski > > HJ, > > You should change the target selector from "*-*-linux*" to "nonpic" since > you'll get a failure on linux with "-m32 -fpic", e.g: > > http://gcc.gnu.org/ml/gcc-testresults/2008-11/msg02492.html I am checking in this patch to make them for nonpic only. > > Note: pr37843-3.c is failing on the nonpic case as well. Even in your own > testsuite results. E.g: > > http://gcc.gnu.org/ml/gcc-testresults/2008-11/msg02491.html > See: http://gcc.gnu.org/ml/gcc-patches/2008-11/msg01309.html Thanks. H.J. --- Index: gcc.target/i386/pr37843-2.c =================================================================== --- gcc.target/i386/pr37843-2.c (revision 142258) +++ gcc.target/i386/pr37843-2.c (working copy) @@ -1,5 +1,5 @@ /* Test for stack alignment with sibcall optimization. */ -/* { dg-do compile { target *-*-linux* } } */ +/* { dg-do compile { target nonpic } } */ /* { dg-options "-O2 -mpreferred-stack-boundary=6 -mincoming-stack-boundary=6" } */ /* { dg-final { scan-assembler-not "and\[lq\]?\[\\t \]*\\$-64,\[\\t \]*%\[re\]?sp" } } */ /* { dg-final { scan-assembler-not "call\[\\t \]*foo" } } */ Index: gcc.target/i386/pr37843-1.c =================================================================== --- gcc.target/i386/pr37843-1.c (revision 142258) +++ gcc.target/i386/pr37843-1.c (working copy) @@ -1,5 +1,5 @@ /* Test for stack alignment with sibcall optimization. */ -/* { dg-do compile { target *-*-linux* } } */ +/* { dg-do compile { target nonpic } } */ /* { dg-options "-O2 -mpreferred-stack-boundary=6 -mincoming-stack-boundary=5" } */ /* { dg-final { scan-assembler "and\[lq\]?\[\\t \]*\\$-64,\[\\t \]*%\[re\]?sp" } } */ /* { dg-final { scan-assembler "call\[\\t \]*foo" } } */ Index: ChangeLog =================================================================== --- ChangeLog (revision 142258) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2008-11-28 H.J. Lu + + PR middle-end/37843 + * gcc.target/i386/pr37843-1.c: Make it nonpic targets only. + * gcc.target/i386/pr37843-2.c: Likewise. + 2008-11-28 Richard Guenther PR tree-optimization/37955