From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121635 invoked by alias); 13 Nov 2015 06:33:49 -0000 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 Received: (qmail 121624 invoked by uid 89); 13 Nov 2015 06:33:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 13 Nov 2015 06:33:46 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id B523A42E5A0; Fri, 13 Nov 2015 06:33:45 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.phx2.redhat.com [10.3.113.52]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAD6XirS032682; Fri, 13 Nov 2015 01:33:45 -0500 Subject: Re: [PR64164] drop copyrename, integrate into expand To: Alexandre Oliva References: <20150723203112.GB27818@gate.crashing.org> <20150810082355.GA31149@arm.com> <55C8BFC3.3030603@redhat.com> <55E72D4C.40705@arm.com> <55FC3171.7040509@arm.com> <56420DC4.3070407@arm.com> <564280E0.7090700@redhat.com> Cc: Alan Lawrence , "gcc-patches@gcc.gnu.org" , Marcus Shawcroft , James Greenhalgh From: Jeff Law Message-ID: <56458448.7030301@redhat.com> Date: Fri, 13 Nov 2015 06:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg01622.txt.bz2 On 11/11/2015 11:10 AM, Alexandre Oliva wrote: > On Nov 10, 2015, Jeff Law wrote: > >>> * function.c (assign_parm_setup_block): Right-shift >>> upward-padded big-endian args when bypassing the stack slot. >> Don't you need to check the value of BLOCK_REG_PADDING at runtime? >> The padding is essentially allowed to vary. > > Well, yeah, it's the result of BLOCK_REG_PADDING that tells whether > upward-padding occurred and shifting is required. > >> If you look at the other places where BLOCK_REG_PADDING is used, it's >> checked in a #ifdef, then again inside a if conditional. > > That's what I do in the patch too. ? I don't see the runtime check in your patch. I see a couple gcc_asserts, but no runtime check of BLOCK_REG_PADDING. > > That said, the initial conditions in the if/else-if/else chain for the > no-larger-than-a-word case cover all of the non-BLOCK_REG_PADDING cases > correctly, so that, if BLOCK_REG_PADDING is not defined, we can just > skip the !MEM_P block altogether. That's also the reason why we can go > straight to shifting when we get there. > > I tried to document my reasoning in the comments, but maybe it was still > too obscure? Certainly seems that way. Is it your assertion that the new code is what we want regardless of the *value* of REG_BLOCK_PADDING? Essentially meaning the check in the IF is covering both cases? What am I missing here? Jeff