Conversation
FRoith
left a comment
There was a problem hiding this comment.
looks good, the only possible improvement I can suggest right now is more randomized test cases, since I can't easily verify the large toml file
but those can be added later too, it looks good enough to merge imo
Talking about tests, is it okay to share some bits about how RV test cases are generated? AFAIK LoongArch does not have a standardized testbench like https://github.com/riscv-software-src/riscv-tests, so maybe yet another script is needed. |
I generated tests by identifying the variable parts of every Instruction, and generating a couple of random bit patterns I could then decode with objdump (or whatever decompiler you want the instructions to match), parse the result and create the tests that way. |
|
but if it's alright, I will merge this in a few minutes |
|
I think I will add generated tests in a later, separate PR. So glad that this one can 🚀! |
Add auto-generated LoongArch64 decoding tables.
The scripts and data sources used to generate the tables can be found at https://gist.github.com/CSharperMantle/7a6615aa2cfcfcf7ce344816db2dc5b3 and https://github.com/loongson/LoongArch-Documentation/blob/e0d6592229d9e00e512bd28b688a7f20b171714f/docs/LoongArch-Vol1-EN/table-of-instruction-encoding.adoc.
Preferred merging strategy: Squash.
Remark. It is not expected to work before #31 is resolved due to some mnemonics containing underscores.
Checklist