AntonLydike / riscemu

RISC-V emulator in python
MIT License
48 stars 13 forks source link

Allow register indices in addition to ABI names #52

Closed superenginegit closed 9 months ago

superenginegit commented 10 months ago

This PR is for issue #51.

I have added a function to parse the arguments of an instruction, that is used to canonicalize the register names. This function could be expanded to do other things with the arguments in the future, if needed.

The canonicalization is done using a dict, that is used replace register-index-names with the according ABI-name.

Additionally I have added a file-check, that is just like the "hello world"-check but uses register-indices instead of ABI-names.

superenginegit commented 10 months ago

@AntonLydike I think you didn't see my PR. I'd appreciate if you could review it.