[PATCH] MIPS gas: Cleanup address insn conditionals

Maciej W. Rozycki macro@ds2.pg.gda.pl
Mon Jun 16 13:15:00 GMT 2003


On Mon, 16 Jun 2003, Thiemo Seufer wrote:

> I changed it to:
> 
> /* Addresses are loaded in different ways, depending on the address
>    size in use and the ABI.  N32_ABI uses additions with overflow
>    checking, this allows to catch code generation errors which would
>    distort the proper sign extension of the 64-bit wide registers.  */
> #define ADDRESS_ADD_INSN						\
>    (HAVE_32BIT_ADDRESSES ? (HAVE_NEWABI ? "add" : "addu") : "daddu")
> 
> #define ADDRESS_ADDI_INSN						\
>    (HAVE_32BIT_ADDRESSES ? (HAVE_NEWABI ? "addi" : "addiu") : "daddiu")

 Hmm, this effectively disables addresses in the ranges of 0x7fff8000 -
0x7fffffff and 0xffff8000 - 0xffffffff for certain operations for the n32
ABI.  The latter is probably out of the scope of the ABI, but the former
certainly is not.  Does any of the ABI documents contain any specific
comment on a special treatment of the range?  Why do you think such an
overflow check should be done -- what advantages are there?  Certainly
"addu" and "addiu" cannot result in improper sign-extension of low 32-bit
halfs of registers. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +



More information about the Binutils mailing list