-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: add a new resumable_trapnz instruction; #1869
Conversation
Subscribe to Label Actioncc @bnjbvr
This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "cranelift:meta"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
Just for context: the reason why I added a new instruction, rather than creating manually the blocks and use the |
Fuzz-target failure is being discussed in XAMPPRocky/remove_dir_all#19. |
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.
LGTM, thanks!
https://github.com/bytecodealliance/wasmtime/blob/master/cranelift/codegen/src/regalloc/safepoint.rs#L54 should probably switch to something like if pos.func.dfg[inst].is_resumable_trap() { ... } that returns true for both |
5a13fdd
to
f04455d
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.
Thanks!
@fitzgen Thanks! Added something to that effect. (It didn't seem worth to make it a flag visible from the meta crate, but let me know if you think it's better (maybe for consistency? probably the other way around would be better imo)) |
Not 100% sure what you're getting at here, but the changes in this PR look great to me! |
This is useful to have to allow resumable_trap to happen in loop headers, for instance. This is the correct way to implement interrupt checks in Spidermonkey, which are effectively resumable traps. Previous implementation was using traps, which is wrong, since traps semantically can't be resumed after.
9b800f4
to
eac98ee
Compare
This is useful to have to allow resumable_trap to happen in loop
headers, for instance. This is the correct way to implement interrupt
checks in Spidermonkey, which are effectively resumable traps. Previous
implementation was using traps, which is wrong, since traps semantically
can't be resumed after.