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

Insn width granularity being 16 bits, producing byte granular output
isn't very useful. With there being a way to specific otherwise
unknown insns to the assembler, use that same representation (to be
precise: its <length>,<encoding> flavor) for disassembly.
This commit is contained in:
Jan Beulich
2023-02-03 08:20:32 +01:00
parent 96e034530e
commit 0655669b86
4 changed files with 39 additions and 49 deletions

View File

@ -1,11 +1,11 @@
#as: -march=rv32ic
#objdump: -d
# Test the disassembly of unknown instruction encodings, specifically,
# ensure that we generate a .?byte opcode.
# ensure that we generate a .insn directive.
#...
Disassembly of section \.text:
[0-9a-f]+ <\.text>:
[0-9a-f]+: 0052018b \.4byte 0x52018b
[0-9a-f]+: 9c45 \.2byte 0x9c45
[0-9a-f]+: 0052018b \.insn 4, 0x0052018b
[0-9a-f]+: 9c45 \.insn 2, 0x9c45