-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
cranelift: Fix shifts and implement rotates in interpreter #4519
Conversation
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.
I don't feel qualified to review the x64 ISLE rules here, so I think @cfallin (or perhaps @abrown or @elliottt?) should glance at this. That said, the new tests look comprehensive to me, and they pass in CI, which gives me good confidence that the lowering changes are correct. The interpreter implementation also looks plausible.
Unfortunately we've changed CI configuration since you opened this PR, so you'll need to rebase to get the new CI actions to run before we can merge this.
|
||
|
||
;; This is a regression test for rotates on x64 | ||
;; See: https://github.com/bytecodealliance/wasmtime/pull/3610 |
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.
I really appreciate that you not only tracked down where these particular tests came from, but also left a link here in case anybody else wonders!
afb00aa
to
32cda80
Compare
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.
This is great -- the 8/16-bit cases becoming simpler is something I hadn't anticipated, but I double-checked and we do indeed generate the 8/16-bit variants of the instructions, so we get the correct semantics for tree. Thanks!
These were moved to the main shifts file in bytecodealliance#4519 but this file was accidentaly left in tree. It also fixes the missing sshr_i8_i8 testcase
These were moved to the main shifts file in bytecodealliance#4519 but this file was accidentaly left in tree. It also fixes the missing sshr_i8_i8 testcase
* cranelift: Remove shifts-small-types runtests These were moved to the main shifts file in #4519 but this file was accidentaly left in tree. It also fixes the missing sshr_i8_i8 testcase * cranelift: Add shifts to fuzzer * cranelift: Add extends to fuzzer
👋 Hey,
This PR fixes some issues with shifts in the interpreter and implements rotates.
It also fixes some issues with the x64 implementation where some type combinations for
rotl
/rotr
were not lowered.cc: @jameysharp @cfallin