public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
To: Andrew Burgess <aburgess@redhat.com>, binutils@sourceware.org
Subject: Re: [PATCH 1/2] opcodes/arm: add missing ';' characters
Date: Thu, 22 Sep 2022 13:39:50 +0100	[thread overview]
Message-ID: <b22e7978-d0e6-37d7-6613-743613b51072@foss.arm.com> (raw)
In-Reply-To: <87mtarepz1.fsf@redhat.com>



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.

  reply	other threads:[~2022-09-22 12:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 13:21 [PATCH 0/2] Disassembler styling for ARM Andrew Burgess
2022-09-16 13:21 ` [PATCH 1/2] opcodes/arm: add missing ';' characters Andrew Burgess
2022-09-20 15:13   ` Richard Earnshaw
2022-09-22  9:08     ` Andrew Burgess
2022-09-22 12:39       ` Richard Earnshaw [this message]
2022-09-22 18:20         ` Andrew Burgess
2022-09-16 13:21 ` [PATCH 2/2] opcodes/arm: add disassembler styling for arm Andrew Burgess
2022-10-02 10:47 ` [PATCHv2 0/2] Disassembler styling for ARM Andrew Burgess
2022-10-02 10:47   ` [PATCHv2 1/2] opcodes/arm: use '@' consistently for the comment character Andrew Burgess
2022-10-03 16:37     ` Andrew Burgess
2022-10-02 10:47   ` [PATCHv2 2/2] opcodes/arm: add disassembler styling for arm Andrew Burgess
2022-10-12 12:42     ` Andrew Burgess
2022-10-19 10:10   ` [PATCHv2 0/2] Disassembler styling for ARM Andrew Burgess
2022-10-31 14:59     ` Nick Clifton
2022-11-01  9:37       ` Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b22e7978-d0e6-37d7-6613-743613b51072@foss.arm.com \
    --to=richard.earnshaw@foss.arm.com \
    --cc=aburgess@redhat.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).