This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [arm] Rework thumb function prologue generation
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Wed, 11 Aug 2004 13:55:33 -0700
- Subject: Re: [arm] Rework thumb function prologue generation
- Organization: CodeSourcery, LLC
- References: <200408111335.32869.paul@codesourcery.com>
Paul Brook wrote:
While trying to fix -fPIC I noticed these are a few places in the thumb
epilogue generation code where we need a spare low register. Each of these
uses its own ad-hoc method for finding one.
The patch below adds a function for figuring out which registers need to be
saved, and another for finding a free work register.
It also removes some redundant comparisons in the epilogue generation code,
and fixes a case where we incoreectly clobber r3
(gcc.dg/compat/scalar-return-3).
Yay!
Tested with cross to arm-none-elf/-mthumb.
Ok?
Yes.
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com