Moore, Catherine via llvm-dev
2017-Apr-06 18:02 UTC
[llvm-dev] Error compiling newlib for ARM with the integrated assembler
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
Tim Northover via llvm-dev
2017-Apr-06 19:53 UTC
[llvm-dev] Error compiling newlib for ARM with the integrated assembler
Hi Catherine, On 6 April 2017 at 11:02, Moore, Catherine <Catherine_Moore at mentor.com> wrote:> 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?This definitely sounds like a bug. We should reject .n and accept .w. Thanks for working on the issue. Tim.