[arm] Rework thumb function prologue generation

Mark Mitchell mark@codesourcery.com
Wed Aug 11 21:02:00 GMT 2004

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 

>Tested with cross to arm-none-elf/-mthumb.

Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

More information about the Gcc-patches mailing list