This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] MIPS gas: Cleanup address insn conditionals
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- Cc: Eric Christopher <echristo at redhat dot com>, binutils at sources dot redhat dot com
- Date: Mon, 16 Jun 2003 15:16:06 +0200 (MET DST)
- Subject: Re: [PATCH] MIPS gas: Cleanup address insn conditionals
- Organization: Technical University of Gdansk
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 +