From: Segher Boessenkool Date: Sat, 31 Oct 2015 19:48:19 +0000 (+0100) Subject: rs6000: Another PIC LRA fix X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f44c1eb7e1c5645fb4e6cfad7a3291ee7a31706a;p=gcc.git 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 * 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. From-SVN: r229633 --- 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 + + * 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 - *ggc-common.c : Restore needed header for checking=release. + * ggc-common.c: Restore needed header for checking=release. 2015-10-31 Tom de Vries 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