Skip to content

riscv_dis_shift_xlen_2

Tsukasa OI edited this page Jul 30, 2022 · 6 revisions

Disassembler: Check shift amount against XLEN (Idea 2)

Conflicts With

Unlike idea 1, conflicts are minimal.

Issue Solved

In the disassembler, there's no validation whether shift amount is valid on specific architecture.

Idea 1 patchset fixes that by adding xlen argument to match_func (in opcode entries).

Idea 2 patchset (this patchset) fixes that by printing invalid0x[SHAMT] instead of actual shift width (SHAMT in hexadecimal).

Styling Support

This patchset supports styling. Invalid shift amounts are printed as text, not immediate.

invalid0x20 (an invalid shift amount) has different color than 0x15 (a valid shift amount)

Clone this wiki locally