I'm working on compiling newlib with LLVM. The target that I'm using is arm-none-eabi. I'm running into an error with compiling strlen (newlib/libc/machine/arm/strlen.S).
strlen.s:4:19: error: invalid operand for instruction
ldrb.w r2, [r3], #1
The test case looks like this (reduced):
.arch armv7
.thumb
.syntax unified
ldrb.w r2, [r3], #1
This assembles fine, if I remove the width modifier (.w) from the ldrb instruction. It also accepts ldrb.n without a problem. Given that this instruction should default to a width of 32 bits, is there any reason why we can't accept the .w modifier? If such a change is acceptable, I will prepare a patch. Any pointers to where such a patch should be implemented, would also be appreciated.
Thanks,
Catherine