aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2013-06-21 22:11:56 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2013-06-21 22:11:56 -0700
commitd7fefe966940f5735d9becfb8718db793acb0fec (patch)
treef11acb3c3b694a10113ea6580301f8ad21f98fe8 /gcc-4.6
parent8716d1d7b8498baa4c48fdc04d8ebabf4baa4352 (diff)
downloadtoolchain_gcc-d7fefe966940f5735d9becfb8718db793acb0fec.zip
toolchain_gcc-d7fefe966940f5735d9becfb8718db793acb0fec.tar.gz
toolchain_gcc-d7fefe966940f5735d9becfb8718db793acb0fec.tar.bz2
Fix GCC 4.6 ARM broken -Os on boost 1.52.0
See b.andriod.com/42891 Back port r190971 2012-09-05 Bin Cheng <bin.cheng@arm.com> Backport from 2012-09-04 mainline r190919 PR target/45070 * config/arm/arm.c (thumb1_extra_regs_pushed): Handle return value of size less than 4 bytes by using macro ARM_NUM_INTS. (thumb1_unexpanded_epilogue): Use macro ARM_NUM_INTS. Change-Id: Ib43bc77abae8d487e82802c8c1f1cce87d5a7e5e
Diffstat (limited to 'gcc-4.6')
-rw-r--r--gcc-4.6/gcc/ChangeLog9
-rw-r--r--gcc-4.6/gcc/config/arm/arm.c8
2 files changed, 13 insertions, 4 deletions
diff --git a/gcc-4.6/gcc/ChangeLog b/gcc-4.6/gcc/ChangeLog
index 3437317..01fd012 100644
--- a/gcc-4.6/gcc/ChangeLog
+++ b/gcc-4.6/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2012-09-05 Bin Cheng <bin.cheng@arm.com>
+
+ Backport from 2012-09-04 mainline r190919
+
+ PR target/45070
+ * config/arm/arm.c (thumb1_extra_regs_pushed): Handle return value of
+ size less than 4 bytes by using macro ARM_NUM_INTS.
+ (thumb1_unexpanded_epilogue): Use macro ARM_NUM_INTS.
+
2012-01-06 Eric Botcazou <ebotcazou@adacore.com>
Backport from mainline
diff --git a/gcc-4.6/gcc/config/arm/arm.c b/gcc-4.6/gcc/config/arm/arm.c
index 2f97e58..1456b30 100644
--- a/gcc-4.6/gcc/config/arm/arm.c
+++ b/gcc-4.6/gcc/config/arm/arm.c
@@ -20451,7 +20451,7 @@ thumb1_extra_regs_pushed (arm_stack_offsets *offsets, bool for_prologue)
unsigned long l_mask = live_regs_mask & (for_prologue ? 0x40ff : 0xff);
/* Then count how many other high registers will need to be pushed. */
unsigned long high_regs_pushed = bit_count (live_regs_mask & 0x0f00);
- int n_free, reg_base;
+ int n_free, reg_base, size;
if (!for_prologue && frame_pointer_needed)
amount = offsets->locals_base - offsets->saved_regs;
@@ -20490,7 +20490,8 @@ thumb1_extra_regs_pushed (arm_stack_offsets *offsets, bool for_prologue)
n_free = 0;
if (!for_prologue)
{
- reg_base = arm_size_return_regs () / UNITS_PER_WORD;
+ size = arm_size_return_regs ();
+ reg_base = ARM_NUM_INTS (size);
live_regs_mask >>= reg_base;
}
@@ -20544,8 +20545,7 @@ 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 - 1)
- / UNITS_PER_WORD);
+ live_regs_mask |= extra_mask << ARM_NUM_INTS (size);
}
/* The prolog may have pushed some high registers to use as