michaelmelanson / michaelmelanson/riscy

Refactor to split `Opcode` by instruction format

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
21
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Currently there's one `Opcode` enum which defines all the opcodes. This means it's possible to create nonsense instructions that should not ever appear in RISC-V code, such as opcodes for the wrong instruction format.

This should be split apart so each instruction format has a separate opcode enum, to get better type safety.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing Opcode enum and the instruction-format definitions in the repository, then inspect how instructions are constructed and validated. Done means each instruction format uses its own opcode enum so invalid opcode and format combinations cannot be represented; verify this with the project's existing checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
embedded-iot
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.