diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2008-08-17 10:47:40 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2008-08-17 10:47:40 +0000 |
commit | 4817c43b1740e11de6ad2e6074cf2a9c4c1d431c (patch) | |
tree | 09279e34a6240e08a65453a31f8b534c6a6d4e0b /gcc | |
parent | 74745ec578126af6bb3f9d68bcfaab0ba9e6039d (diff) | |
download | gcc-4817c43b1740e11de6ad2e6074cf2a9c4c1d431c.zip gcc-4817c43b1740e11de6ad2e6074cf2a9c4c1d431c.tar.gz gcc-4817c43b1740e11de6ad2e6074cf2a9c4c1d431c.tar.bz2 |
mips.c (mips_save_reg_p): Don't short-circuit rest of function when handling GLOBAL_POINTER_REGNUM.
gcc/
* config/mips/mips.c (mips_save_reg_p): Don't short-circuit rest
of function when handling GLOBAL_POINTER_REGNUM.
From-SVN: r139169
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index faa9226..9b3fc6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-08-17 Richard Sandiford <rdsandiford@googlemail.com> + + * config/mips/mips.c (mips_save_reg_p): Don't short-circuit rest + of function when handling GLOBAL_POINTER_REGNUM. + 2008-08-16 Eric Botcazou <ebotcazou@adacore.com> PR ada/20548 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 48daec4..51af59b 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -8322,10 +8322,12 @@ mips_global_pointer (void) static bool mips_save_reg_p (unsigned int regno) { - /* We only need to save $gp if TARGET_CALL_SAVED_GP and only then - if we have not chosen a call-clobbered substitute. */ - if (regno == GLOBAL_POINTER_REGNUM) - return TARGET_CALL_SAVED_GP && cfun->machine->global_pointer == regno; + /* We need to save $gp if TARGET_CALL_SAVED_GP and if we have not + chosen a call-clobbered substitute. */ + if (TARGET_CALL_SAVED_GP + && regno == GLOBAL_POINTER_REGNUM + && cfun->machine->global_pointer == regno) + return true; /* Check call-saved registers. */ if ((crtl->saves_all_registers || df_regs_ever_live_p (regno)) |