d0iasm / rvemu

RISC-V emulator for CLI and Web written in Rust with WebAssembly. It supports xv6 and Linux (ongoing).
https://rvemu.app/
MIT License
774 stars 58 forks source link

Remove useless space for plic register #11

Closed RinHizakura closed 3 years ago

RinHizakura commented 3 years ago

Look like some math mistakes are made for the number of registers you actually need? For register pending, the size 0x80 is 16 * 8 = 128 bytes, so we need only 32 4 bytes (uin32_t) registers only. The same calculation error happens on enable too.

d0iasm commented 3 years ago

Thank you for your PR! You're right. I'm merging your PR. Thanks :)