mirror of
https://github.com/PiMaker/rvc.git
synced 2024-11-21 19:40:08 +00:00
A 32 bit RISC-V emulator made using a shader
7f47c7655d
Note that the 'riscv32ima-unknown-none-elf' target is not available by default in rustc, you need a patched version. I'm also pretty sure just converting the ELF binary to raw using objdump messes with stack and heap addresses, but it seems to work fine for now. |
||
---|---|---|
elfy | ||
opensbi@f30b18944e | ||
riscv-opcodes@7d1a0e3153 | ||
riscv-rust@b4895fc56b | ||
riscv-tests@1b2c3ea84a | ||
rust_payload | ||
src | ||
.gitignore | ||
.gitmodules | ||
dts.dts | ||
dts.dts.final | ||
instructions.txt | ||
LICENSE | ||
Makefile | ||
parse_ins.pl | ||
README.md | ||
test.sh |
rvc - risc v in c
An experimental 32-bit [0] RISC-V emulator written in plain C [1], with a focus on porting the result to a HLSL pixel shader.
Mostly based on takahirox/riscv-rust, which is a great resource for learning about RISC-V in general, aside from the official specs of course.
[0] GPUs only really support 32-bit integer math (in the use-case I want to put this in anyway)
[1] The elf loader ('elfy') is written in Rust, because I was too lazy to do it myself in C (Rust uses the 'elf' crate) and it doesn't need porting anyway.
Why?
Because.
License
MIT. Take it or leave it.