Patchwork [ARM] Fix PR target/50106

login
register
mail settings
Submitter Ramana Radhakrishnan
Date Oct. 19, 2011, 7:27 p.m.
Message ID <CACUk7=UZ0srt8xHE+=Th2ybw82JBGiW4nghjwqToG12siqur4g@mail.gmail.com>
Download mbox | patch
Permalink /patch/120687/
State New
Headers show

Comments

Ramana Radhakrishnan - Oct. 19, 2011, 7:27 p.m.
Hi,

This fixes PR target/50106 which was missing handling return register
size from 1-3 for Thumb1. Fixed thusly. Final testing on-going with
arm-linux-gnueabi with thumb1.

Ok to backport to 4.6 branch given it is branch freeze time ? I'll be
able to commit this to the branch latest by tomorrow A.M. UK time.

cheers
Ramana


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

        PR target/50106
        * config/arm/arm.c (thumb_unexpanded_epilogue): Handle return
reg size from 1-3.
Nathan Froyd - Oct. 19, 2011, 7:38 p.m.
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
Jakub Jelinek - Oct. 20, 2011, 9:12 a.m.
On Wed, Oct 19, 2011 at 08:27:26PM +0100, Ramana Radhakrishnan wrote:
> Ok to backport to 4.6 branch given it is branch freeze time ? I'll be

Yeah (with the changes Nathan suggested).

> 2011-10-19  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
> 
>         PR target/50106
>         * config/arm/arm.c (thumb_unexpanded_epilogue): Handle return
> reg size from 1-3.

	Jakub

Patch

Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c	(revision 180200)
+++ gcc/config/arm/arm.c	(working copy)
@@ -21652,7 +21652,7 @@ 
   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 + 3) / UNITS_PER_WORD);
     }

   /* The prolog may have pushed some high registers to use as