bug-binutils
[Top][All Lists]
Advanced

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

Re: Is this a bug? Can do mov r0, #676


From: Daniel Jacobowitz
Subject: Re: Is this a bug? Can do mov r0, #676
Date: Sun, 2 Oct 2005 10:21:28 -0400
User-agent: Mutt/1.5.8i

On Sat, Oct 01, 2005 at 11:27:38AM -0500, Jay Monkman wrote:
> I'm using a cross assembler for ARM, running on x86, and seeing something 
> weird.
> 
> Here's the test program:
> 
> foo:
>       mov     r0, #675
> 
> Assemble with this:
> arm-linux-as -o foo.o foo.S
> 
> Here's what happens:
>       arm-linux-as -o foo.o foo.s
>       foo.s: Assembler messages:
>       foo.s:0: Warning: end of file not at end of a line; newline inserted
>       foo.s:2: Error: invalid constant -- `mov r7,#675'
> 
> If the number is 676 it works fine.
> 
> I've tried with the following binutils versions with identical results.
>       2.13.2.1
>       2.15.
>       2.16.1
> 
> Immediate operands are limited to 8 bits. Then why does 676 work?

You should take another look at the ARM instruction set documentation;
immediate moves are limited to eight bits _plus a rotate_.

-- 
Daniel Jacobowitz
CodeSourcery, LLC




reply via email to

[Prev in Thread] Current Thread [Next in Thread]