Skip to content

0x00000000 incorrectly decoded as c.addi4spn #40

@ripopov

Description

@ripopov

Encodings with bits [15:0] all zeros are defined as illegal instructions. These instructions are considered to be of minimal length: 16 bits if any 16-bit instruction-set extension is present, otherwise 32 bits. The encoding with bits [ILEN-1:0] all ones is also illegal; this instruction is considered to be ILEN bits long.

https://riscv.github.io/riscv-isa-manual/snapshot/unprivileged/#%5C_base_instruction_length_encoding

Issue discovered in Surfer waveform viewer, that uses instruction-decoder to translate signals to RISCV instructions:
https://gitlab.com/surfer-project/surfer/-/work_items/553

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions