Open rprichard opened 3 years ago
ldr.w r0, [r1, #2]! ldr.w r0, [r1], #2 ldr.w r0, [r1, #-0]
Actually it looks like a current version of LLVM can handle the first two of these. Only the last one is a problem, and that's basically the same as "ldr.w r0, [r1, #-2]".
Extended Description
LLVM can assemble this Thumb2 code (clang --target=armv7a-linux-gnueabi):
But not this:
test.S:3:15: error: invalid operand for instruction ldr.w r0, [r1, #-2] ^
It will assemble if I remove the ".w" suffix. The disassembly is then:
00000000 <.text>: 0: f851 0c02 ldr.w r0, [r1, #-2]
... which indicates a wide instruction.
Maybe the fix for bug #49118 was incomplete?
There are some similar instructions that, IIRC, use the same encoding, and have the same problem. They're wide instructions that can only be assembled if the ".w" suffix is omitted: