linux-mips
[Top] [All Lists]

Re: load/store address overflow on binutils 2.14

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: load/store address overflow on binutils 2.14
From: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Date: Fri, 8 Aug 2003 01:15:18 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <20030807.190330.26271096.nemoto@toshiba-tops.co.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030807.190330.26271096.nemoto@toshiba-tops.co.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.4i
Atsushi Nemoto wrote:
> I'm trying binutils 2.14 (and binutils 2.14.90.0.5).  These versions
> can not compile this inctruction.
> 
>       lw      $2, 0x80000000
> 
> $ mips-linux-gcc -c foo.s
> b.S: Assembler messages:
> foo.S:1: Error: load/store address overflow (max 32 bits)
> 
> Using such an immediate address for load instructions is legal?  I
> found the error message in tc-mips.c and it looks like something
> related to 64bit ABIs, but I just want to compile 32bit (standalone)
> program.
> 
> Is this code really needed for 32bit ABI?
> 
> binutils-2.14/gas/config/tc-mips.c:6297
>         else if (offset_expr.X_op == O_constant
>                  && !HAVE_64BIT_ADDRESS_CONSTANTS
>                  && !IS_SEXT_32BIT_NUM (offset_expr.X_add_number))
>           as_bad (_("load/store address overflow (max 32 bits)"));

It shouldn't trigger for 32bit, because 0x80000000 is a sign-extended
32bit number. How is mips-linux-as actually invoked?


Thiemo

<Prev in Thread] Current Thread [Next in Thread>