]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/50106 ([ARM] Wrong code with -march=armv5t -mthumb -Os)
authorRamana Radhakrishnan <ramana.radhakrishnan@linaro.org>
Thu, 20 Oct 2011 09:07:30 +0000 (09:07 +0000)
committerRamana Radhakrishnan <ramana@gcc.gnu.org>
Thu, 20 Oct 2011 09:07:30 +0000 (09:07 +0000)
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.

From-SVN: r180240

gcc/ChangeLog
gcc/config/arm/arm.c

index 9ef7e64c2c8711b5be7a0e66a8dea1b71e410a46..6c084c88ffb5f9fa6fcbb8a8c90993ccab3e6246 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2011-10-20  Richard Guenther  <rguenther@suse.de>
 
        * tree-ssa-loop-im.c (stmt_cost): Add WIDEN_*, FMA_EXPR
index f1ada6f9a7386dca53e59b350fbe0e1118788ad3..e07c8c328c612c603249496d022a965a84a0dd48 100644 (file)
@@ -21652,7 +21652,8 @@ thumb_unexpanded_epilogue (void)
   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