[PATCH 1/2] opcodes/arm: add missing ';' characters
Richard Earnshaw
Richard.Earnshaw@foss.arm.com
Thu Sep 22 12:39:50 GMT 2022
On 22/09/2022 10:08, Andrew Burgess wrote:
> Richard Earnshaw <Richard.Earnshaw@foss.arm.com> writes:
>
>> On 16/09/2022 14:21, Andrew Burgess via Binutils wrote:
>>> I spotted a couple of places where the ARM disassembler produces what
>>> seems to be some comment style text '@ Impl Def' without including a
>>> comment character ';'. In other places where we have similar messages
>>> a comment character is emitted, so I suspect this was just an
>>> oversight.
>>>
>>> Fixed in this commit by adding two new comment characters, and
>>> updating the expected test results.
>>
>> No, this is incorrect. @ is the comment marker on Arm; ';' is the
>> statement separator.
>>
>
> Wow! OK. So, I tested what you said, and you'd absolutely correct.
> But does that mean all the places where the disassembler prints what (I
> believe) is clearly a comment without printing '@' is actually a bug?
> Or am I missing something really subtle here?
>
> Here are just a few of the many examples that can be found in the gas
> testsuite for ARM:
>
> sub r0, r0, #32, 24 ; 0x2000
> add r0, r0, #32, 24 ; 0x2000
> nop ; (mov r0, r0)
> subhi pc, pc, #805306368 ; 0x30000000
> ldrh r3, [pc, #-8] ; 8 <foo>
> ldrsb r2, [r3, #255] ; 0xff
> ldrsh r1, [r4, #-250] ; 0xffffff06
> ldrsb r1, [r5, #240] ; 0xf0
> strh r2, [pc, #48] ; 68 <bar>
>
> There are many more, but they are all pretty similar in content.
>
> Should I instead propose changing all these to use '@' ?
>
> Thanks,
> Andrew
>
Technically, yes. But I don't think we've ever claimed that you could
paste the output of the disassembler into an assembler and directly use
the result. So while this would be good to fix, I don't think it's a
disaster.
R.
More information about the Binutils
mailing list