Closed ptersilie closed 3 months ago
Can we add tests to x86_64/mod.rs about the generated code? Those are more robust tests than the lang_tests for these sorts of thing (and the JIT IR parser & fm incombination make creating such tests pretty easy).
I can, but it will require me to add at least 8 unit tests to get the same coverage as the langtest has now.
I improved the langtest a bit and simplified the implementation for byte-sized values. I also added a unit test. Let me know if you want me to add unit tests for the other 7 cases.
In general I would love it if we unit tested all the cases, because that will really help us going forwards, but I will leave that to your discretion until yklua is running. Please squash if you want.
Squashed (I kinda wanna push on with things and look into testing later).
This fixes a bug with the sdiv implementation. The reason for the bug was that I misunderstood some details about
idiv
.