From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18184 invoked by alias); 17 Feb 2015 08:07:02 -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 18171 invoked by uid 89); 17 Feb 2015 08:07:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f45.google.com Received: from mail-qa0-f45.google.com (HELO mail-qa0-f45.google.com) (209.85.216.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 17 Feb 2015 08:07:00 +0000 Received: by mail-qa0-f45.google.com with SMTP id j7so25390744qaq.4 for ; Tue, 17 Feb 2015 00:06:58 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.229.114.74 with SMTP id d10mr199952qcq.5.1424160418796; Tue, 17 Feb 2015 00:06:58 -0800 (PST) Received: by 10.140.93.183 with HTTP; Tue, 17 Feb 2015 00:06:58 -0800 (PST) Reply-To: ramrad01@arm.com In-Reply-To: <000301d036e5$d0fbadb0$72f30910$@arm.com> References: <000001d02fe3$c12d7d90$438878b0$@arm.com> <000301d036e5$d0fbadb0$72f30910$@arm.com> Date: Tue, 17 Feb 2015 08:07:00 -0000 Message-ID: Subject: Re: [PATCH, ARM] Fix PR64453: live high register not saved in function prolog with -Os From: Ramana Radhakrishnan To: "Thomas Preud'homme" Cc: Ramana Radhakrishnan , gcc-patches , Richard Biener , Jakub Jelinek Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg01001.txt.bz2 On Fri, Jan 23, 2015 at 8:23 AM, Thomas Preud'homme wrote: > Hi Ramana, > >> From: Ramana Radhakrishnan [mailto:ramana.gcc@googlemail.com] >> Sent: Wednesday, January 14, 2015 7:21 PM >> On Wed, Jan 14, 2015 at 10:20 AM, Thomas Preud'homme >> wrote: >> > When compiling for size, live high registers are not saved in function >> prolog in ARM backend in Thumb mode. The problem comes from >> arm_conditional_register_usage setting call_used_regs for all high >> register to avoid them being allocated. However, this cause prolog to not >> save these register even if they are used. This patch marks high registers >> as really needing to be saved in prolog if live, no matter what is the >> content of call_used_regs. >> > >> > ChangeLog entries are as follows: >> > >> > gcc/ChangeLog >> > >> > 2015-01-12 Thomas Preud'homme thomas.preudhomme@arm.com >> > >> > PR target/64453 >> > * config/arm/arm.c (callee_saved_reg_p): Define. >> > (arm_compute_save_reg0_reg12_mask): Use callee_saved_reg_p >> to check if >> > register is callee saved instead of !call_used_regs[reg]. >> > (thumb1_compute_save_reg_mask): Likewise. >> > >> > >> > gcc/testsuite/ChangeLog >> > >> > 2014-12-31 Thomas Preud'homme thomas.preudhomme@arm.com >> > >> > * gcc.target/arm/pr64453.c: New. >> > >> > >> > >> >> OK. >> >> Ramana > > The patch applies cleanly on GCC 4.8 and 4.9 branches when omitting the cosmetic change > in arm_conditional_register_usage () which was unintended. I compiled an arm-none-eabi > GCC cross compiler and ran the testsuite for both backport without any regression. > > Is this ok for the 4.8 and 4.9 branches? > OK for the branches if no RM objects in 24 hours. Ramana > Best regards, > > Thomas > > >