-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Unwinding support for inline assembly #88439
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I actually started working on a PR myself before you posted this one, but it's still very much a WIP: master...Amanieu:asm_unwind More changes to MIR are needed to support this since MIR needs to be aware of unwinding. In particular |
I updated my branch at master...Amanieu:asm_unwind, it should now handle all of the MIR parts that deal with unwinding. |
@Amanieu That's great! Do you mind if I rebase this PR onto your branch? (at the end just adding codegen) |
Sure! Just keep in mind I haven't actually tested any of it apart from checking it compiles. |
@Amanieu No worries. I am going to add some tests anyway and so then we shall see :) (But that has to wait until tomorrow or the day after tomorrow. But codgen-wise, it should be correct, as I've seen here: cynecx/libfringe#1 (comment). EDIT: however there might have been some issues after all because I haven't properly dealt with MIR xD). |
I updated my branch again, there were a few more things I missed in MIR. |
This comment has been minimized.
This comment has been minimized.
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.
Can you also:
- update the documentation in the unstable book to add
may_unwind
. - double-check the interaction between
#[naked]
andmay_unwind
: does this allow you to unwind from a naked function?
Will do.
As far as I have seen from several llvm-ir/assembly dumps (irl testcase: [1]), it should work just fine. [1] https://github.com/cynecx/libfringe/blob/asm/src/arch/x86_64.rs (your unwinding branch for libfringe basically) |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #80522) made this pull request unmergeable. Please resolve the merge conflicts. |
@cynecx Are you still working on this PR? |
@Amanieu Yes I am. Sorry about the delay, I was caught up in some other things... Trying a rebase rn. |
68a3b41
to
8553004
Compare
☔ The latest upstream changes (presumably #91318) made this pull request unmergeable. Please resolve the merge conflicts. |
@Amanieu rebased and test fixed. |
@bors r+ |
📌 Commit 3dbb621 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (887999d): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
r? @Amanieu