This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH, ARM] Fix PR64453: live high register not saved in function prolog with -Os
- From: "Thomas Preud'homme" <thomas dot preudhomme at arm dot com>
- To: "Ramana Radhakrishnan" <Ramana dot Radhakrishnan at arm dot com>
- Cc: "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, 3 Mar 2015 17:35:06 +0800
- 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> <CAJA7tRYqnATSE9jmHWWmKEva=9eLrjzNdZ-L7PkRwm19hAuepQ at mail dot gmail dot com>
Just committed to 4.9 branch, 4.8 to follow once regression testsuite for
4.8 backport finishes running (backport was done quite some time ago now).
Best regards,
Thomas
> -----Original Message-----
> From: Ramana Radhakrishnan [mailto:ramana.gcc@googlemail.com]
> Sent: Tuesday, February 17, 2015 4:07 PM
> To: Thomas Preud'homme
> Cc: Ramana Radhakrishnan; gcc-patches; Richard Biener; Jakub Jelinek
> Subject: Re: [PATCH, ARM] Fix PR64453: live high register not saved in
> function prolog with -Os
>
> On Fri, Jan 23, 2015 at 8:23 AM, Thomas Preud'homme
> <thomas.preudhomme@arm.com> 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
> >> <thomas.preudhomme@arm.com> 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
> >
> >
> >