-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement clz/ctz instructions #42
Conversation
0368341
to
7d689b7
Compare
NOTE: I'm adding some tests for this, as found some issues (not with the intrinsics, but somewhere in the emulator I think when testing the behavior, something to do with how memory and the operand stack interoperate, I'll fix it tomorrow when I have a moment) |
I made #44 for Wasm translation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
I could not check the MASM code of the intrinsics in my head due to its complexity. So having tests for them would be nice, but I'm recalling from the discord thread that these ops will be implemented in VM soon, so I guess we can afford to skip the tests for now.
I saw your note but missed the revert of the status to draft. I'll do another round when its ready.
6d95c52
to
9586b41
Compare
This PR builds on changes in #37, and adds implementations of
clz
andctz
for integral types up to 32 bits.In this PR, a couple of small tweaks/fixes as well:
loc_store
andloc_storew
, which we use in one of the new intrinsicscodegen/masm/intrinsics
rust-wasm-tests
from workspace members, since it is compiled and run with a separate build profile viafrontend-wasm
's test suite. When added as a workspace member the profilerust-wasm-tests
defines is ignored, so it's not going to do what we expect. We'll catch any issues with that crate when CI runs our tests anyway.Closes #39