This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"Error: constant too large" on mips gas


With recent binutils (2.15.96 and 20050331 snapshot), mips-linux-as
does not accept this instruction.

	lw	$2, 0x80000000

$ mips-linux-as -32 -non_shared foo.s
foo.s: Assembler messages:
foo.s:1: Error: constant too large

I got same result without -32 or -non_shared option.

The error was generated here.

gas/config/tc-mips.c:5788:
      /* A constant expression in PIC code can be handled just as it
	 is in non PIC code.  */
      if (offset_expr.X_op == O_constant)
	{
	  if (HAVE_32BIT_ADDRESSES
	      && !IS_SEXT_32BIT_NUM (offset_expr.X_add_number))
	    as_bad (_("constant too large"));

It looks like an old 2.14 problem (which was fixed on 2.15).
Subject: [patch] MIPS/gas: load/store address overflow on binutils 2.14
http://sourceware.org/ml/binutils/2003-09/msg00104.html

Is this desired behavior?

---
Atsushi Nemoto
I'm not on this ML.  Please CC to me.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]