AntonLydike / riscemu

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

Support for pseudoops #8

Open tobiasgrosser opened 2 years ago

tobiasgrosser commented 2 years ago

I just realized riscemu does not support seqz, snez, sltz and slez. These and the other pseudoinstructions documents in the RISCV manual would be really useful.

AntonLydike commented 2 years ago

Great catch!

Some pseudonyms are already implemented, I think I'll ad a separate "instruction set" which contains all pseudonyms, so they can be included or excluded as needed.

bjourne commented 2 months ago

So much real world code contains pseudoinstructions so this feature would be very useful. :)

AntonLydike commented 2 months ago

Thanks for the poke @bjourne, this appears to be a relatively straight-forward thing to implement. I'm happy to give feedback on a PR on this, if anyone decides to tackle the problem, or implement it myself when I find the time.

I guess a good first step would be to get a list of all pseudoinstructions from the manual?