* 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.
This commit is contained in:
Maciej W. Rozycki 2013-05-28 22:19:34 +00:00
parent 418009c200
commit f19ccbda97
17 changed files with 186 additions and 1 deletions

View file

@ -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;