This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: "Error: constant too large" on mips gas
> And here is the result of the above assumptions, together with test suite
> updates this time. :-) Tested with no regressions for mips64el-linux-gnu.
>
> gas/:
> 2005-04-04 Maciej W. Rozycki <macro@linux-mips.org>
>
> * config/tc-mips.c (IS_ZEXT_32BIT_NUM): New macro.
> (normalize_address_expr): New function to sign-extend address
> offsets that fit into 32 bits in 32-bit mode.
> (macro_build_ldst_constoffset): Use normalize_address_expr()
> instead of a handcoded sequence.
> (load_register): Likewise. Report oversized numbers in a useful
> way.
> (macro) [ld_st, ldd_std]: Reject all oversized offsets, not only
> for constant addresses. Report oversized numbers in a useful way.
> (mips_ip): Use normalize_address_expr() for addresses.
>
> gas/testsuite/:
> 2005-04-04 Maciej W. Rozycki <macro@linux-mips.org>
>
> * gas/mips/ldstla-32.s: Exclude offsets that are now meant to fail
> and include more instructions/offsets that are meant to succeed.
> Use $4 instead $3 to avoid register dependencies.
> * gas/mips/ldstla-32.d: Update accordingly.
> * gas/mips/ldstla-32-shared.d: Likewise.
> * gas/mips/ldstla-32-1.s: New test for offsets that are meant to
> fail.
> * gas/mips/ldstla-32-1.l: Stderr output for the new test.
> * gas/mips/mips.exp: Run the new test (twice).
>
> OK to apply?
OK. Some documentation on this probably wouldn't be amiss either :)
-eric