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
Atsushi Nemoto wrote:
> >>>>> On Tue, 05 Apr 2005 11:38:00 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> said:
> anemo> Thank you. It works for the case I reported. And here is an
> anemo> another case:
>
> And yet another corner case:
>
> $ cat foo2.s
> .set mips3
> ld $2, 0x80000000
> dsrl32 $2, 0
> sw $2, 0x80000008
> .set mips0
> $ mips-linux-as -32 foo2.s
> foo2.s: Assembler messages:
> foo2.s:2: Error: Number (0x080000000) larger than 32 bits
> foo2.s:4: Error: Number (0x080000008) larger than 32 bits
>
> I'm using '.set mips3' for "true" LD instruction (not two LW) in 32bit
> kernel mode. Is this legal or should I rewrite it?
It is legal, and the intended use case for .set mips3.
Thiemo