From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14101 invoked by alias); 13 Jan 2011 17:16:51 -0000 Received: (qmail 14091 invoked by uid 22791); 13 Jan 2011 17:16:50 -0000 X-SWARE-Spam-Status: No, hits=-2.0 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; Thu, 13 Jan 2011 17:16:45 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 3FEA2CB02F7; Thu, 13 Jan 2011 18:16:43 +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 veJxC7fDQ-bL; Thu, 13 Jan 2011 18:16:43 +0100 (CET) Received: from [192.168.1.2] (bon31-9-83-155-120-49.fbx.proxad.net [83.155.120.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id E6E1ECB01D6; Thu, 13 Jan 2011 18:16:42 +0100 (CET) From: Eric Botcazou To: Richard Henderson Subject: Re: [patch] Fix PR middle-end/46894 Date: Thu, 13 Jan 2011 17:24:00 -0000 User-Agent: KMail/1.9.9 Cc: gcc-patches@gcc.gnu.org References: <201101131720.52843.ebotcazou@adacore.com> <4D2F2B88.7060507@redhat.com> In-Reply-To: <4D2F2B88.7060507@redhat.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201101131814.20674.ebotcazou@adacore.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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: 2011-01/txt/msg00851.txt.bz2 > I think that you shouldn't change the behaviour of alignment wrt > STACK_POINTER_OFFSET. So far, all targets do have (sp+S_P_O) with > the required alignment. > > What about > > must_align = (crtl->preferred_stack_boundary < required_align); > if (STACK_POINTER_OFFSET * BITS_PER_UNIT % required_align) > must_align = true; > > if (must_align) > { > if (required_align > P_S_B) > ... > } > > #ifdef STACK_DYNAMIC_OFFSET > /* ??? S_D_O will not be finalized until we've finished expanding the > function. It would be nice to know what minimum alignment we might > assume. E.g. PUSH_ROUNDING or something. */ > must_align = true; > extra_align = BITS_PER_UNIT; > #endif > > if (must_align) > { > unsigned extra = ... Fine with me, but an explicit ack from a RM would probably be in order because you're changing the behavior for all targets where STACK_DYNAMIC_OFFSET isn't defined, i.e. all of them except for PPC, PA and s390; the default definition of STACK_DYNAMIC_OFFSET in function.c doesn't seem to guarantee that it will always maintain PREFERRED_STACK_BOUNDARY alignment. -- Eric Botcazou