Skip to content

riscv_dis_nonalias

Tsukasa OI edited this page Oct 3, 2022 · 3 revisions

Disassembler: Make some instruction non-aliases

Conflicts With

Issue Solved

Certain instructions are defined as aliases (with INSN_ALIAS) but some of them have no "parent" instructions (without INSN_ALIAS).

As a result, if the disassembler has given an option of no-aliases, they will be printed as .4byte meaning not recognized.

Example

With following assembler file with -march=rv32i_zbkb,

_start:
    zip a0, a1
    unzip a2, a3

The output with objdump -d is like this:

80000028 <_start>:
80000028:   08f59513      zip     a0,a1
8000002c:   08f6d613      unzip   a2,a3

However, output with objdump -d -M no-aliases looks like this:

80000028 <_start>:
80000028:   08f59513      .4byte  0x8f59513
8000002c:   08f6d613      .4byte  0x8f6d613

Fixed Instructions

  • zip (RV32_Zbkb)
  • unzip (RV32_Zbkb)
  • fence.tso (RV{32,64}I)

Note that zip and unzip fix is based on my previous patchset.

Clone this wiki locally