aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mips.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-05-28 22:19:34 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-05-28 22:19:34 +0000
commitf19ccbda970a50bf1b633aea25f04c0fa873b32c (patch)
treef6e24062f658f5bc3f617bf35ad2f06c6ffdce4e /gas/config/tc-mips.c
parent418009c200310bee330ac27ab44cd9390a72bfef (diff)
downloadgdb-f19ccbda970a50bf1b633aea25f04c0fa873b32c.zip
gdb-f19ccbda970a50bf1b633aea25f04c0fa873b32c.tar.gz
gdb-f19ccbda970a50bf1b633aea25f04c0fa873b32c.tar.bz2
gas/
* config/tc-mips.c (macro) <ld>: Don't use $zero for address calculation. gas/testsuite/ * gas/mips/ld-zero.d: New test. * gas/mips/ld-zero-2.d: New test. * gas/mips/ld-zero-3.d: New test. * gas/mips/ld-zero-q.d: New test. * gas/mips/ld-zero-u.d: New test. * gas/mips/ecoff@ld-zero-3.d: New test. * gas/mips/micromips@ld-zero-2.d: New test. * gas/mips/micromips@ld-zero-3.d: New test. * gas/mips/ld-zero.s: New test source. * gas/mips/ld-zero-2.s: New test source. * gas/mips/ld-zero-3.s: New test source. * gas/mips/ld-zero-q.s: New test source. * gas/mips/ld-zero-u.s: New test source. * gas/mips/mips.exp: Run the new tests.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r--gas/config/tc-mips.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 9b191bb..1f16dc9 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -8286,7 +8286,8 @@ macro (struct mips_cl_insn *ip)
goto ld_st;
ld:
- if (breg == treg + lp)
+ /* We don't want to use $0 as tempreg. */
+ if (breg == treg + lp || treg + lp == ZERO)
goto ld_st;
else
tempreg = treg + lp;