objdump riscv: Stop disassembling addi rd, rs, 0 with a relocation as mv rd, rs?

Nelson Chu nelson@rivosinc.com
Thu Feb 9 02:21:40 GMT 2023


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


More information about the Binutils mailing list