[ARM] Fix PR target/50106

Submitted by Ramana Radhakrishnan on Oct. 20, 2011, 9:09 a.m.

Details

Message ID CACUk7=Unw8s0gz9diEsd3aiTTzcVhOT1hrDBF_9GMbuAOmvbWg@mail.gmail.com
State New
Headers show

Commit Message

Ramana Radhakrishnan Oct. 20, 2011, 9:09 a.m.
On 19 October 2011 20:38, Nathan Froyd <nfroyd@mozilla.com> wrote:
> On 10/19/2011 3:27 PM, Ramana Radhakrishnan wrote:
>>
>> Index: gcc/config/arm/arm.c
>> -      live_regs_mask |= extra_mask<<  (size / UNITS_PER_WORD);
>> +      live_regs_mask |= extra_mask<<  ((size + 3) / UNITS_PER_WORD);
>
> IIUC, wouldn't ((size + UNITS_PER_WORD - 1) / UNITS_PER_WORD) be clearer?
>
> -Nathan
>


Doh ! Yes , this is what I committed.

Ramana

 2011-10-20  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

       PR target/50106
       * config/arm/arm.c (thumb_unexpanded_epilogue): Handle return
        reg size from 1-3.

Patch hide | download patch | download mbox

Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c	(revision 180239)
+++ gcc/config/arm/arm.c	(working copy)
@@ -21652,7 +21652,8 @@ 
   if (extra_pop > 0)
     {
       unsigned long extra_mask = (1 << extra_pop) - 1;
-      live_regs_mask |= extra_mask << (size / UNITS_PER_WORD);
+      live_regs_mask |= extra_mask << ((size + UNITS_PER_WORD - 1) 
+				       / UNITS_PER_WORD);
     }
 
   /* The prolog may have pushed some high registers to use as