[PATCH 4/5] MIPS/GAS: Get rid of $at from o32 LD where possible

Maciej W. Rozycki macro@linux-mips.org
Sun Oct 31 22:47:00 GMT 2010


Hi,

 Here is a change to the o32 LD "A(b)" variant to make it use one of the 
target registers as a temporary as available.  Depending on the 
circumstances either the lower or the higher target register is used.  
The macro only resorts to $at in a pathological case like this:

	ld	$31, 0x10000($31)

This complements the change made to the "o(b)" variant, except here it is 
an optimisation only, rather than a bug fix.

2010-10-31  Maciej W. Rozycki  <macro@linux-mips.org>

	gas/
	* config/tc-mips.c (macro)[M_LD_AB]: Use one of the target 
	registers as a temporary if possible.
	[M_L_DAB, M_S_DAB, M_SD_AB]: Adjust accordingly.

	gas/testsuite/
	* gas/mips/ld.d: Replace $at with one of the target registers.
	* gas/mips/mips1@ld.d: Likewise.
	* gas/mips/mips1@ld-forward.d: Likewise.
	* gas/mips/ld-svr4pic.d: Likewise.
	* gas/mips/ld-xgot.d: Likewise.
	* gas/mips/ldstla-32.d: Likewise.
	* gas/mips/ldstla-32-shared.d: Likewise.
	* gas/mips/mips-abi32.d: Likewise.
	* gas/mips/mips-abi32-pic.d: Likewise.
	* gas/mips/mips-gp32-fp32.d: Likewise.
	* gas/mips/mips-gp32-fp32-pic.d: Likewise.
	* gas/mips/mips-gp32-fp64.d: Likewise.
	* gas/mips/mips-gp32-fp64-pic.d: Likewise.

 OK?

  Maciej

binutils-2.20.51-20100925-mips-gas-ld-a-base.patch
[Patch attached compressed due to its size.]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-2.20.51-20100925-mips-gas-ld-a-base.patch.bz2
Type: application/x-bzip2
Size: 5655 bytes
Desc: 
URL: <https://sourceware.org/pipermail/binutils/attachments/20101031/4a3c092b/attachment.bz2>


More information about the Binutils mailing list