From: Alan Modra Date: Sat, 30 Apr 2016 00:33:26 +0000 (+0930) Subject: [RS6000] Simplify setting of fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd1c95f7fb199ee3ab5dfe1c54a70df1b6fb6290;p=gcc.git [RS6000] Simplify setting of fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] This makes the conditions look the same as other places that deal with RS6000_PIC_OFFSET_TABLE_REGNUM, eg. first_reg_to_save. No functional changes. * config/rs6000/rs6000.c (rs6000_conditional_register_usage): Remove redundant PIC_OFFSET_TABLE_REGNUM test. Replace with flag_pic test for Darwin. From-SVN: r235669 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 98bd8481bd0..ea7fe290728 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-04-30 Alan Modra + + * config/rs6000/rs6000.c (rs6000_conditional_register_usage): + Remove redundant PIC_OFFSET_TABLE_REGNUM test. Replace with + flag_pic test for Darwin. + 2016-04-30 Alan Modra * regs.h (struct reg_info_t): Delete freq_calls_crossed and diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 1cbb206ff75..1d24aa7999f 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -8650,21 +8650,16 @@ rs6000_conditional_register_usage (void) if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2) call_really_used_regs[2] = 0; - if (DEFAULT_ABI == ABI_V4 - && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM - && flag_pic == 2) + if (DEFAULT_ABI == ABI_V4 && flag_pic == 2) fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1; - if (DEFAULT_ABI == ABI_V4 - && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM - && flag_pic == 1) + if (DEFAULT_ABI == ABI_V4 && flag_pic == 1) fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1; - if (DEFAULT_ABI == ABI_DARWIN - && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) - fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] + if (DEFAULT_ABI == ABI_DARWIN && flag_pic) + fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1;