From patchwork Thu Feb 12 22:10:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 439345 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 524F8140182 for ; Fri, 13 Feb 2015 09:10:47 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=n2ydzf6yyHPJIBUoC 5fvnjocjM75V2Zh+QvOUGQa4lZTB/TZF1upoq+pn6cKIF/vvfI1wKg3Sl/WxsiJ+ wZOUGo42AKvrwmMmmG944rAfWKxMvkSy0T0QULVpXYP7HGNJE6t4SHr1FEJ3/PJ0 0GLcIbf+OLUufvR3+VplzCgfck= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=PvaFVT2e0Qr6AiMCjVVbw3B 4JdE=; b=nspN9bzHugaNe8XsQyDfwMOcKo6090/dbnQAyx7cO4KJ3Ztkaxp2AKV kahzm8aT7aK+tj369q9XxgYpX/7eNb9sNmp40alkCZDndUOvujUXIF2Db4B7zpx/ T6O5+A8Dxeeae+Eud7j2NgqBhBZTLTgI/g9hKc9q530M8Dm85//4= Received: (qmail 2208 invoked by alias); 12 Feb 2015 22:10:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 2196 invoked by uid 89); 12 Feb 2015 22:10:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_FROM_URIBL_PCCC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 12 Feb 2015 22:10:38 +0000 Received: by mail-pa0-f54.google.com with SMTP id kx10so14176149pab.13 for ; Thu, 12 Feb 2015 14:10:37 -0800 (PST) X-Received: by 10.66.139.226 with SMTP id rb2mr9993966pab.105.1423779036933; Thu, 12 Feb 2015 14:10:36 -0800 (PST) Received: from bubble.grove.modra.org (CPE-58-160-155-134.oycza5.sa.bigpond.net.au. [58.160.155.134]) by mx.google.com with ESMTPSA id vo9sm1989875pab.0.2015.02.12.14.10.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 14:10:36 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 36F1EEA3759; Fri, 13 Feb 2015 08:40:31 +1030 (ACDT) Date: Fri, 13 Feb 2015 08:40:31 +1030 From: Alan Modra To: David Edelsohn Cc: GCC Patches , Segher Boessenkool Subject: Re: [RS6000] Fix -m32 -Os lossage Message-ID: <20150212221030.GP4274@bubble.grove.modra.org> Mail-Followup-To: David Edelsohn , GCC Patches , Segher Boessenkool References: <20150212123357.GO4274@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes On Thu, Feb 12, 2015 at 10:04:45AM -0500, David Edelsohn wrote: > On Thu, Feb 12, 2015 at 7:33 AM, Alan Modra wrote: > > * config/rs6000/rs6000.c (rs6000_emit_epilogue): Use addsi3_carry > > or adddi3_carry when restoring frame_reg_rtx from r0 after restvr. > > Okay. Committed revision 220665. I also intend to commit the following as obvious when stage1 opens, to fix a bug in code I contributed. It's not a regression nor is the generated code incorrect, but we have one unnecessary instruction. --- /tmp/savres.s 2015-02-12 22:29:05.598357377 +1030 +++ savres.s 2015-02-13 08:26:49.437565909 +1030 @@ -1916,11 +1916,10 @@ lwz 11,0(1) addi 0,11,-48 bl _restvr_26 - addic 11,0,16 - lwz 12,-12(11) - lwz 30,-8(11) - lwz 31,-4(11) - addi 11,11,32 + addic 11,0,48 + lwz 12,-44(11) + lwz 30,-40(11) + lwz 31,-36(11) mtcrf 32,12 b _restfpr_28_x .size b_cvfr,.-b_cvfr @@ -1966,10 +1965,9 @@ lwz 11,0(1) addi 0,11,-48 bl _restvr_26 - addic 11,0,16 - lwz 30,-8(11) - lwz 31,-4(11) - addi 11,11,32 + addic 11,0,48 + lwz 30,-40(11) + lwz 31,-36(11) b _restfpr_28_x .size b_vfr,.-b_vfr .align 2 * config/rs6000/rs6000.c (rs6000_emit_epilogue): Fix typo in code setting up r11 for out-of-line fp restore. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 220665) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -24966,7 +24966,7 @@ rs6000_emit_epilogue (int sibcall) bool lr = !(strategy & REST_NOINLINE_FPRS_DOESNT_RESTORE_LR); int sel = SAVRES_FPR | (lr ? SAVRES_LR : 0); newptr_regno = ptr_regno_for_savres (sel); - end_save = info->gp_save_offset + info->gp_size; + end_save = info->fp_save_offset + info->fp_size; } if (newptr_regno != 1 && REGNO (frame_reg_rtx) != newptr_regno)