Skip to content

A possible approach to handle the match table for the risc-v instructionset #4

@pharaun

Description

@pharaun
  1. Since some instruction have data where func7 and func3 are, we can't just do a single 'mask' we need to identify the type of instruction it is, perform a mask (in the right shape to only allow through ie opcode, func3, and func7 as needed)
  2. a macro that creates a single linear match table, perhaps in a format like such:
macro!([
 (<func7>, <func3>, <opcode>, function/code for that instruction),
 (0x0, 0x0, LUI, <function>)
]);
  1. This should now allow me to have a nice single linear match of u32 against u32, the question i guess is will this be easier to maintain and be faster than ie 3 u32 in a tuple against 3 u32 in a tuple matches, (cos there a small over head (i think) of detecting the instruction type to employ the correct mask.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions