summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-31 19:48:19 +0000
committersegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-31 19:48:19 +0000
commitc27fc6317e81281be31c1dd3de799a4cbd7bffa1 (patch)
tree8ccfe01cf58b4bf612178e510cc766ad8849e430
parent7185e92b45c2d5f3781cb91648ffb7d2d7ed4086 (diff)
downloadgcc-c27fc6317e81281be31c1dd3de799a4cbd7bffa1.tar.gz
rs6000: Another PIC LRA fix
This one for TARGET_TOC && TARGET_MINIMAL_TOC. Without it, r30 is not saved in the prologue for functions that do not use r30, but the register is set later in the prologue anyhow. This made all java tests fail. 2015-10-31 Segher Boessenkool <segher@kernel.crashing.org> * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Use the same condition for testing whether RS6000_PIC_OFFSET_TABLE_REGNUM is live as for using it elsewhere, for TARGET_MINIMAL_TOC. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229633 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/rs6000/rs6000.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 34da96050aa..c4ad5e4ee8d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,12 @@
+2015-10-31 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Use the
+ same condition for testing whether RS6000_PIC_OFFSET_TABLE_REGNUM is
+ live as for using it elsewhere, for TARGET_MINIMAL_TOC.
+
2015-10-31 Markus Trippelsdorf <markus@trippelsdorf.de>
- *ggc-common.c : Restore needed header for checking=release.
+ * ggc-common.c: Restore needed header for checking=release.
2015-10-31 Tom de Vries <tom@codesourcery.com>
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 53b86afd83f..75ddaa2d3fc 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -22034,7 +22034,9 @@ rs6000_reg_live_or_pic_offset_p (int reg)
|| (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
&& !TARGET_SINGLE_PIC_BASE
&& ((DEFAULT_ABI == ABI_V4 && flag_pic != 0)
- || (DEFAULT_ABI == ABI_DARWIN && flag_pic))));
+ || (DEFAULT_ABI == ABI_DARWIN && flag_pic)
+ || (TARGET_TOC && TARGET_MINIMAL_TOC
+ && get_pool_size () != 0))));
}
/* Return the first fixed-point register that is required to be