This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, ARM] Fix PR64453: live high register not saved in function prolog with -Os
- From: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- To: "Thomas Preud'homme" <thomas dot preudhomme at arm dot com>
- Cc: Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>, Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 17 Feb 2015 08:06:58 +0000
- Subject: Re: [PATCH, ARM] Fix PR64453: live high register not saved in function prolog with -Os
- Authentication-results: sourceware.org; auth=none
- References: <000001d02fe3$c12d7d90$438878b0$ at arm dot com> <CAJA7tRbCvWyrB8WUxa71H2wiGDp86Joq-1kRTbrAvqxCgp9okw at mail dot gmail dot com> <000301d036e5$d0fbadb0$72f30910$ at arm dot com>
- Reply-to: ramrad01 at arm dot com
On Fri, Jan 23, 2015 at 8:23 AM, Thomas Preud'homme
> Hi Ramana,
>> From: Ramana Radhakrishnan [mailto:email@example.com]
>> Sent: Wednesday, January 14, 2015 7:21 PM
>> On Wed, Jan 14, 2015 at 10:20 AM, Thomas Preud'homme
>> <firstname.lastname@example.org> 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 email@example.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 firstname.lastname@example.org
>> > * gcc.target/arm/pr64453.c: New.
> 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.
> Best regards,