[PATCH] RISC-V: don't disassemble unrecognized insns as .byte

Kito Cheng kito.cheng@gmail.com
Mon Jan 30 02:07:46 GMT 2023


> > As to the special case code for 2-, 4-, and 8-byte insns: Any thoughts
> > towards zero-padding the numbers there as well? That would make yet more
> > noticable what the insn width is; in particular - see e.g. ".8byte 0x3f"
> > in full disassembly of the testcases modified here - it would avoid the
> > value looking like it was for a more narrow one.
> >
> > Taking it yet one step further - how about printing unknown insns as
> > ".insn ...", matching what gas would consume?
>
> I don't remember how long ago, Kito did discuss this idea with me, but
> since we haven't supported mapping symbols at that time, it's been
> forgotten until this patch.  Anyway, I vote to dump the unrecognized
> instructions into .insn directives, so if there is no objection,
> please go ahead.
>
> Also cc Kito, he should have almost forgotten about this :-)

I like printing .insn too, we have mapping symbols now, so it should
be able to distinguish between code and data :)


More information about the Binutils mailing list