diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5de6fcde733e..49c55a441a8c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-11-17 Ulrich Weigand + + * config/spu/spu.c (get_pic_reg): Use LAST_ARG_REGNUM as PIC + registers in leaf functions if possible. + 2009-11-17 Maxim Kuvyrkov * config/m68k/m68k-devices.def: Add MCF5441x family. diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 2888da672818..a75f04a61ab5 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -1710,6 +1710,8 @@ get_pic_reg (void) rtx pic_reg = pic_offset_table_rtx; if (!reload_completed && !reload_in_progress) abort (); + if (current_function_is_leaf && !df_regs_ever_live_p (LAST_ARG_REGNUM)) + pic_reg = gen_rtx_REG (SImode, LAST_ARG_REGNUM); return pic_reg; }