"Error: constant too large" on mips gas
Atsushi Nemoto
anemo@mba.ocn.ne.jp
Mon Apr 4 08:58:00 GMT 2005
>>>>> On Fri, 01 Apr 2005 12:35:28 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> said:
anemo> With recent binutils (2.15.96 and 20050331 snapshot), mips-linux-as
anemo> does not accept this instruction.
anemo> lw $2, 0x80000000
anemo> $ mips-linux-as -32 -non_shared foo.s
anemo> foo.s: Assembler messages:
anemo> foo.s:1: Error: constant too large
I modified tc-mips.c to omit this error on 32bit gpr target. Is this
a correct fix?
--- binutils-050331.org/gas/config/tc-mips.c 2005-03-22 06:59:34.000000000 +0900
+++ binutils-050331/gas/config/tc-mips.c 2005-04-04 17:48:06.223712588 +0900
@@ -5790,6 +5790,7 @@ macro (struct mips_cl_insn *ip)
if (offset_expr.X_op == O_constant)
{
if (HAVE_32BIT_ADDRESSES
+ && HAVE_64BIT_GPRS
&& !IS_SEXT_32BIT_NUM (offset_expr.X_add_number))
as_bad (_("constant too large"));
---
Atsushi Nemoto
More information about the Binutils
mailing list