Re: load/store address overflow on binutils 2.14

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux