From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25634 invoked by alias); 10 Nov 2015 23:43:12 -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 25370 invoked by uid 89); 10 Nov 2015 23:42:36 -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; Tue, 10 Nov 2015 23:42:27 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id A8A5791DCC; Tue, 10 Nov 2015 23:42:25 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-52.phx2.redhat.com [10.3.113.52]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAANgOkk031376; Tue, 10 Nov 2015 18:42:25 -0500 Subject: Re: [PR64164] drop copyrename, integrate into expand To: Alexandre Oliva , Alan Lawrence 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> Cc: "gcc-patches@gcc.gnu.org" , Marcus Shawcroft , James Greenhalgh From: Jeff Law Message-ID: <564280E0.7090700@redhat.com> Date: Tue, 10 Nov 2015 23:43: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/msg01304.txt.bz2 On 11/10/2015 03:58 PM, Alexandre Oliva wrote: > On Nov 10, 2015, Alan Lawrence wrote: > >> FAIL: gcc.target/aarch64/aapcs64/func-ret-4.c execution, -O2 > > Ugh, sorry. I even checked that testcase by hand before submitting the > patch, because I knew it took the paths I was changing, but I didn't > realize the stack store and load would amount to shifts when the stack > slot was bypassed. > > With the following patch, we get a lsr and a ubfx, without the sp > adjustments. Please let me know if it causes any further problems. So > far, I've tested it on x86_64-linux-gnu, i686-linux-gnu, and > ppc64le-linux-gnu; the ppc64-linux-gnu test run is running slower and > probably won't be done before I call it a day, but I wanted to give you > something before taking off for the day. > > Is this ok to install if ppc64-linux-gnu also regstraps successfully? > > > [PR67753] adjust for padding when bypassing memory in assign_parm_setup_block > > From: Alexandre Oliva > > Storing a register in memory as a full word and then accessing the > same memory address under a smaller-than-word mode amounts to > right-shifting of the register word on big endian machines. So, if > BLOCK_REG_PADDING chooses upward padding for BYTES_BIG_ENDIAN, and > we're copying from the entry_parm REG directly to a pseudo, bypassing > any stack slot, perform the shifting explicitly. > > This fixes the miscompile of function_return_val_10 in > gcc.target/aarch64/aapcs64/func-ret-4.c for target aarch64_be-elf > introduced in the first patch for 67753. > > for gcc/ChangeLog > > PR rtl-optimization/67753 > PR rtl-optimization/64164 > * 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. 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. Jeff