public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nelson Chu <nelson@rivosinc.com>
To: "Maciej W. Rozycki" <macro@embecosm.com>
Cc: Jan Beulich <jbeulich@suse.com>,
	binutils@sourceware.org, Fangrui Song <i@maskray.me>,
	 Andreas Schwab <schwab@suse.de>,
	Jim Wilson <jim.wilson.gcc@gmail.com>,
	 Palmer Dabbelt <palmer@rivosinc.com>,
	Andrew Waterman <andrew@sifive.com>,
	 Kito Cheng <kito.cheng@sifive.com>
Subject: Re: objdump riscv: Stop disassembling addi rd, rs, 0 with a relocation as mv rd, rs?
Date: Thu, 9 Feb 2023 10:21:40 +0800	[thread overview]
Message-ID: <CAPpQWtDFyS77M8AnpKQ20YEW2=Ct+LvafUxg_QJaCgUxaH=CXw@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.2302071601070.7841@tpp.orcam.me.uk>

Seems most of the experts agree with this good idea.  Besides, in the
other thread discussion, Palmer and I also like it,  so I created a
bugzilla to trace this,
https://sourceware.org/bugzilla/show_bug.cgi?id=30099

Thanks
Nelson

On Wed, Feb 8, 2023 at 12:05 AM Maciej W. Rozycki <macro@embecosm.com> wrote:
>
> On Tue, 7 Feb 2023, Jan Beulich wrote:
>
> > >  However it may be quite hard to implement given how the GNU disassembler
> > > has been structured; most easily probably by setting the `no_aliases' flag
> > > temporarily for any instruction seen with a relocation attached.  This
> > > could have undesired consequences elsewhere though and would most likely
> > > make Jan unhappy who wants to see aliases in disassembly rather than
> > > machine instruction mnemonics with the immediate forms.
> > >
> > >  So instead we may need another flag for the opcode table, such as
> > > INSN_NORELOC, which would exclude the given entry for instructions with
> > > any relocation attached; I think this would be the cleanest approach,
> > > though maybe a little bit more involving implementation-wise.
> >
> > Could we get away with simply skipping aliases in general when there's a
> > relocation for an insn?
>
>  I think it would be unreasonably inconsistent though.  Also I think we do
> want to keep the `*z' branch forms in disassembly.
>
>   Maciej

      reply	other threads:[~2023-02-09  2:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07  2:40 Fangrui Song
2023-02-07 14:39 ` Maciej W. Rozycki
2023-02-07 15:14   ` Jan Beulich
2023-02-07 15:44     ` Andreas Schwab
2023-02-07 16:04     ` Maciej W. Rozycki
2023-02-09  2:21       ` Nelson Chu [this message]

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='CAPpQWtDFyS77M8AnpKQ20YEW2=Ct+LvafUxg_QJaCgUxaH=CXw@mail.gmail.com' \
    --to=nelson@rivosinc.com \
    --cc=andrew@sifive.com \
    --cc=binutils@sourceware.org \
    --cc=i@maskray.me \
    --cc=jbeulich@suse.com \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=macro@embecosm.com \
    --cc=palmer@rivosinc.com \
    --cc=schwab@suse.de \
    /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).