aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Brook <pbrook@gcc.gnu.org>2004-11-11 01:24:07 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2004-11-11 01:24:07 +0000
commitcfa01aaba5f17c815e1349bb9cd1db13ad024b69 (patch)
treedaa8fbb1727f005f09d672a6924f743eb955a29f
parented50f1785b9c17eb092cb3b2a022ab4dba5ce801 (diff)
downloadgcc-cfa01aaba5f17c815e1349bb9cd1db13ad024b69.zip
gcc-cfa01aaba5f17c815e1349bb9cd1db13ad024b69.tar.gz
gcc-cfa01aaba5f17c815e1349bb9cd1db13ad024b69.tar.bz2
arm.c (arm_compute_save_reg0_reg12_mask): Save PIC register if current_function_uses_pic_offset_table is set.
* config/arm/arm.c (arm_compute_save_reg0_reg12_mask): Save PIC register if current_function_uses_pic_offset_table is set. From-SVN: r90465
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/arm/arm.c11
2 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a3f0026..1c32849 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-11 Paul Brook <paul@codesourcery.com>
+
+ * config/arm/arm.c (arm_compute_save_reg0_reg12_mask): Save PIC
+ register if current_function_uses_pic_offset_table is set.
+
2004-11-10 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.md (define_attr "type"): Add two and three.
@@ -47,7 +52,7 @@
2004-11-10 Fariborz Jahanian <fjahanian@apple.com>
PR tree-optimization/17892
- * tree-ssa-dom.c (unsafe_associative_fp_binop): Add test for
+ * tree-ssa-dom.c (unsafe_associative_fp_binop): Add test for
MINUS_EXPR operator.
2004-11-10 James A. Morrison <phython@gcc.gnu.org>
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 914babe..24474e9 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -8630,6 +8630,12 @@ arm_compute_save_reg0_reg12_mask (void)
if (regs_ever_live[reg]
|| (! current_function_is_leaf && call_used_regs [reg]))
save_reg_mask |= (1 << reg);
+
+ /* Also save the pic base register if neccessary. */
+ if (flag_pic
+ && !TARGET_SINGLE_PIC_BASE
+ && current_function_uses_pic_offset_table)
+ save_reg_mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
}
else
{
@@ -8649,8 +8655,9 @@ arm_compute_save_reg0_reg12_mask (void)
/* If we aren't loading the PIC register,
don't stack it even though it may be live. */
if (flag_pic
- && ! TARGET_SINGLE_PIC_BASE
- && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+ && !TARGET_SINGLE_PIC_BASE
+ && (regs_ever_live[PIC_OFFSET_TABLE_REGNUM]
+ || current_function_uses_pic_offset_table))
save_reg_mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
}