Skip to content

Tracking Issue for asm_cfg: #[cfg(...)] within asm! #140364

Closed

Description

@folkertdev

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

This feature was discussed in #140279. It allows configuring templates and operands in the assembly macros, for example:

asm!( // or global_asm! or naked_asm!
    "nop",
    #[cfg(target_feature = "sse2")]
    "nop",
    // ...
    #[cfg(target_feature = "sse2")]
    a = const 123, // only used on sse2
);

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.

Steps

Unresolved Questions

Implementation history

@rustbot label +T-lang +F-asm +A-inline-assembly

Activity

  1. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Apr 27, 2025
  2. added
    A-inline-assemblyArea: Inline assembly (`asm!(…)`)
    F-asm`#![feature(asm)]` (not `llvm_asm`)
    T-langRelevant to the language team
    on Apr 27, 2025
  3. added a commit that references this issue on May 28, 2025
  4. added a commit that references this issue on May 28, 2025
  5. added
    I-lang-radarItems that are on lang's radar and will need eventual work or consideration.
    on Sep 2, 2025
  6. added a commit that references this issue on Nov 25, 2025
  7. added a commit that references this issue on Nov 25, 2025
  8. added a commit that references this issue on Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-inline-assemblyArea: Inline assembly (`asm!(…)`)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-asm`#![feature(asm)]` (not `llvm_asm`)I-lang-radarItems that are on lang's radar and will need eventual work or consideration.T-langRelevant to the language team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions