diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2012-08-27 16:25:47 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2012-08-27 16:25:47 +0000 |
commit | cb038fd20d3d744471b887658786e7a765fb3e1b (patch) | |
tree | 3136191e2b55124155aee6fe1a205646a0f00475 | |
parent | d8c5157261ce99adf33da209c6ba73f41cb9419b (diff) | |
download | gcc-cb038fd20d3d744471b887658786e7a765fb3e1b.zip gcc-cb038fd20d3d744471b887658786e7a765fb3e1b.tar.gz gcc-cb038fd20d3d744471b887658786e7a765fb3e1b.tar.bz2 |
mips.c (mips_pic_call_symbol_from_set): Check for SYMBOL_REF SET_SRCs.
gcc/
* config/mips/mips.c (mips_pic_call_symbol_from_set): Check for
SYMBOL_REF SET_SRCs.
From-SVN: r190717
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 18 |
2 files changed, 17 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 82c7a35..ac45772 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2012-08-27 Richard Sandiford <rdsandiford@googlemail.com> + * config/mips/mips.c (mips_pic_call_symbol_from_set): Check for + SYMBOL_REF SET_SRCs. + +2012-08-27 Richard Sandiford <rdsandiford@googlemail.com> + * config/mips/mips.c (vr4130_align_insns): Don't simulate ghost instructions. Assert that the required instructions exist. diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index b20e4ed..7721a7c 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -14706,13 +14706,13 @@ mips_pic_call_symbol_from_set (df_ref def, rtx reg, bool recurse_p) { rtx note, src, symbol; - /* First, look at REG_EQUAL/EQUIV notes. */ - note = find_reg_equal_equiv_note (def_insn); - if (note && GET_CODE (XEXP (note, 0)) == SYMBOL_REF) - return XEXP (note, 0); - - /* For %call16 references we don't have REG_EQUAL. */ + /* First see whether the source is a plain symbol. This is used + when calling symbols that are not lazily bound. */ src = SET_SRC (set); + if (GET_CODE (src) == SYMBOL_REF) + return src; + + /* Handle %call16 references. */ symbol = mips_strip_unspec_call (src); if (symbol) { @@ -14720,6 +14720,12 @@ mips_pic_call_symbol_from_set (df_ref def, rtx reg, bool recurse_p) return symbol; } + /* If we have something more complicated, look for a + REG_EQUAL or REG_EQUIV note. */ + note = find_reg_equal_equiv_note (def_insn); + if (note && GET_CODE (XEXP (note, 0)) == SYMBOL_REF) + return XEXP (note, 0); + /* Follow at most one simple register copy. Such copies are interesting in cases like: |