riscvarchive / riscv-binutils-gdb

RISC-V backports for binutils-gdb. Development is done upstream at the FSF.
GNU General Public License v2.0
148 stars 233 forks source link

objdump cant correctly dissemble instructions that reuse other's encoding #265

Open linsinan1995 opened 2 years ago

linsinan1995 commented 2 years ago

for example, lwgp in zceb extension(zceb do not co-exist with D extension) reuses the encoding of fld, but

lwgp x0,4

will be dissembled into

00403007   fld ft0,4(zero)

it is also a problem for c.decbnez instructions in zceb extenstion.

maybe we can add an arch option to the disassembler, and the disassembler can skip those unsupported instructions based on the given arch string?