This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH, ARM, ping2] Backport fix for 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>
- Date: Tue, 17 Feb 2015 16:05:40 +0800
- Subject: RE: [PATCH, ARM, ping2] Backport fix for PR64453: live high register not saved in function prolog with -Os
- Authentication-results: sourceware.org; auth=none
Ping?
> -----Original Message-----
> From: Thomas Preud'homme [mailto:thomas.preudhomme@arm.com]
> Sent: Tuesday, January 27, 2015 1:24 PM
> To: Thomas Preud'homme; Ramana Radhakrishnan
> Cc: gcc-patches
> Subject: RE: [PATCH, ARM, ping1] Fix PR64453: live high register not
> saved in function prolog with -Os
>
> Ping?
>
> > -----Original Message-----
> > From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> > owner@gcc.gnu.org] On Behalf Of Thomas Preud'homme
> > Sent: Friday, January 23, 2015 4:23 PM
> > To: Ramana Radhakrishnan
> > Cc: gcc-patches
> > Subject: RE: [PATCH, ARM] Fix PR64453: live high register not saved in
> > function prolog with -Os
> >
> > 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?
> >
> > Best regards,
> >
> > Thomas
> >
> >
> >