Skip to content
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

Fix asm goto with outputs and move it to a separate feature gate #131523

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nbdd0121
Copy link
Contributor

Tracking issue: #119364

This PR addresses 3 aspects of asm goto with outputs:

  • Codegen is fixed. My initial implementation has an oversight which cause the output to be only stored in fallthrough path, but not in label blocks.
  • Outputs can now be used with options(noreturn) if a label block is given.
  • All of this is moved to a new feature gate, because we likely want to stabilise asm_goto before asm goto with outputs.

@rustbot labels: +A-inline-assembly +F-asm

@rustbot
Copy link
Collaborator

rustbot commented Oct 11, 2024

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-inline-assembly Area: Inline assembly (`asm!(…)`) F-asm `#![feature(asm)]` (not `llvm_asm`) labels Oct 11, 2024
@bors
Copy link
Contributor

bors commented Oct 23, 2024

☔ The latest upstream changes (presumably #132027) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member

r? compiler-errors

I'll review this, please ping me if I don't get to it in a few days

@rustbot rustbot assigned compiler-errors and unassigned TaKO8Ki Oct 28, 2024
@bors
Copy link
Contributor

bors commented Nov 2, 2024

☔ The latest upstream changes (presumably #132470) made this pull request unmergeable. Please resolve the merge conflicts.

When outputs are used together with labels, they are considered
to be written for all destinations, not only when falling through.
When labels are present, the `noreturn` option really means that asm block
won't fallthrough -- if labels are present, then outputs can still be
meaningfully used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-inline-assembly Area: Inline assembly (`asm!(…)`) F-asm `#![feature(asm)]` (not `llvm_asm`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants