Skip to content

riscv_long_insn_1

Tsukasa OI edited this page Nov 28, 2022 · 6 revisions

RISC-V: Better support for long instructions (64 < x <= 176 [bits])

Issue Solved

Commit bb996692bd96 ("RISC-V/gas: allow generating up to 176-bit instructions with .insn") was suddenly merged into master by Jan Beulich. Although this encoding is not considered frozen (see the section "Expanded Instruction-Length Encoding" in the ISA Manual), such attempt makes sense.

However, it was insufficient in some ways. I quickly found a stack-based buffer overflow and fixed that. Besides that, I found following issues related to long (assembler: .insn-based, disassembler: unrecognized and printed as .byte) instructions:

  1. Assembler: False "value conflicts with instruction length" error
  2. Assembler: DWARF line number information is missing with big numbers
  3. Disassembler: Instruction is trimmed with 64-bits

Related

Clone this wiki locally