michaelmelanson / michaelmelanson/riscy
Add instruction encoding for "C" extension
- Dominant language
- Rust
- Stars
- 21
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
When implementing the "C" extension set, I didn't implement instruction encoding like I did for the other instruction formats.
Be sure to add all the appropriate test cases, using `encoding_test` to ensure that decoding some bytes then re-encoding them again produces the original bytes. Here's an example test:
https://github.com/michaelmelanson/riscy/blob/2cee7487e1dbc7e65c2af8c7ef9ebc211fa9bf37/isa/src/lib.rs#L155-L162
## Instruction formats
These instruction formats are documented in Chapter 12 ("C” Standard Extension for Compressed Instructions, Version 2.0) of the RISC-V specification:
- [ ] CIW
- [ ] CS
- [ ] CL
- [ ] CI
- [ ] CNOP / CB
- [ ] CA
- [ ] CJ
- [ ] CR
- [ ] CSS
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in isa/src/lib.rs, using the encoding_test example around the referenced lines to trace how other instruction formats decode and re-encode. Consult Chapter 12 of the RISC-V specification and cover CIW, CS, CL, CI, CNOP/CB, CA, CJ, CR, and CSS. Done means the listed formats encode correctly and decoding then re-encoding test cases reproduces the original bytes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100