Fix asm goto with outputs and move it to a separate feature gate by nbdd0121 · Pull Request #131523 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation12 Commits3 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

nbdd0121

Tracking issue: #119364

This PR addresses 3 aspects of asm goto with outputs:

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

@rustbot

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

@bors

@compiler-errors

r? compiler-errors

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

@bors

@nbdd0121

@ojeda ojeda mentioned this pull request

Nov 20, 2024

95 tasks

compiler-errors

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit then r=me

let mut _out: u64;
unsafe {
asm!("mov {}, 1", "jmp {}", out(reg) _out, label {});
//~^ ERROR using both label and outputs operands for inline assembly is unstable

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a typo? I think it should be "label and output operands"

@compiler-errors

@bors

✌️ @nbdd0121, you can now approve this pull request!

If @compiler-errors told you to "r=me" after making some further change, please make that change, then do @bors r=@compiler-errors

@compiler-errors

You also may want to rebase this PR just in case

@nbdd0121

When outputs are used together with labels, they are considered to be written for all destinations, not only when falling through.

@nbdd0121

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.

@nbdd0121

@compiler-errors

@bors

📌 Commit 0178ba2 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

label

Nov 24, 2024

@bors bors added the S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

label

Nov 24, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Nov 25, 2024

@bors

…iaskrgr

Rollup of 8 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Nov 25, 2024

@rust-timer

Rollup merge of rust-lang#131523 - nbdd0121:asm, r=compiler-errors

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

Tracking issue: rust-lang#119364

This PR addresses 3 aspects of asm goto with outputs:

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

Labels

A-inline-assembly

Area: Inline assembly (`asm!(…)`)

F-asm

`#![feature(asm)]` (not `llvm_asm`)

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.