From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12767 invoked by alias); 13 Jan 2011 16:43:16 -0000 Received: (qmail 12614 invoked by uid 22791); 13 Jan 2011 16:43:13 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Jan 2011 16:43:02 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0DGgmEI005026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Jan 2011 11:42:49 -0500 Received: from anchor.twiddle.home (ovpn-113-146.phx2.redhat.com [10.3.113.146]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p0DGgmk7025392; Thu, 13 Jan 2011 11:42:48 -0500 Message-ID: <4D2F2B88.7060507@redhat.com> Date: Thu, 13 Jan 2011 17:07:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 MIME-Version: 1.0 To: Eric Botcazou CC: gcc-patches@gcc.gnu.org Subject: Re: [patch] Fix PR middle-end/46894 References: <201101131720.52843.ebotcazou@adacore.com> In-Reply-To: <201101131720.52843.ebotcazou@adacore.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 2011-01/txt/msg00845.txt.bz2 On 01/13/2011 08:20 AM, Eric Botcazou wrote: > Now there is a hitch: since > > 2003-10-07 Geoffrey Keating > > * function.c (pad_to_arg_alignment): Take STACK_POINTER_OFFSET into > account when aligning arguments. > * calls.c (STACK_POINTER_OFFSET): Move default from here ... > * defaults.h (STACK_POINTER_OFFSET): ... to here. > > STACK_POINTER_OFFSET is always defined, so we always align; with the patch, > we'll additionally always assume BITS_PER_UNIT. But I guess this latter > pessimization is dwarfed by the former. What do you think, Richard? 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 = ... r~