rust-lang / rust-lang/rust

Tracking Issue for asm_goto_with_outputs

Open
#119,364 14 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-inline-assembly C-tracking-issue F-asm
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

The feature gate for the issue is #![feature(asm_goto_with_outputs)].

Summary

This now tracks the with_outputs variant since https://github.com/rust-lang/rust/pull/131523. asm_goto was stabilized in 1.87.

This feature adds a label<block> operand type to asm!.

Example:


unsafe {
    asm!(
        "jmp {}",
        label {
            println!("Jumped from asm!");
        }
    );
}

The block must have unit type.

Steps
Unresolved Questions

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tracking issue, feature gate asm_goto_with_outputs, stabilization PR #133870, and the linked LLVM miscompilation issue. The remaining work is represented by the unchecked implementation, documentation, and Style Guide tasks; done requires those checklist items to be completed while resolving the stated LLVM concern.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.