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 _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils