-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Listed in 2 issues
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-asm`#![feature(asm)]` (not `llvm_asm`)`#![feature(asm)]` (not `llvm_asm`)T-langRelevant to the language teamRelevant to the language teamdisposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
The feature gate for the issue is #![feature(asm_const)]
.
Summary
This feature adds a const <expr>
operand type to asm!
and global_asm!
.
<expr>
must be an integer constant expression.- The value of the expression is formatted as a string and substituted directly into the asm template string.
Status
Blocked on the stabilization of inline consts (#76001).
DCNick3, coastalwhite, jablonskim, joseluis and raftario
Metadata
Metadata
Assignees
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-asm`#![feature(asm)]` (not `llvm_asm`)`#![feature(asm)]` (not `llvm_asm`)T-langRelevant to the language teamRelevant to the language teamdisposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
asm!
) #72016bstrie commentedon Jan 28, 2022
Is it possible that this may not actually be blocked on inline_const? AIUI, the concern was that stabilizing asm_const would expose the semantics of inline_const to stable, so any change to the semantics of the yet-unstable inline_const would potentially break stable users of asm_const. But AFAICT there are no more foreseen semantic changes coming to inline_const, and the only remaining question is a syntactic one, specifically with regard to how macros would consume
const {}
blocks, which seems irrelevant toasm!
which is providing its own syntax over inline_const anyway. Of course, it's worth asking to determine whether or not it's correct that the semantics of inline_const have truly solidified.master
intonext
rust-osdev/x86_64#344Fix CI error about:
Fix CI error about:
asm_const
to hardcodeMODULUS
andINV
as immediates in generated assembly arkworks-rs/algebra#483arch/aarch64: Implement paging
40 remaining items
#[naked]
functions using global asm #128004asm_const
#128464const
operand to docs for inline assembly rust-lang/reference#1556asm_const
#128570Rollup merge of rust-lang#128570 - folkertdev:stabilize-asm-const, r=…
Unrolled build for rust-lang#128570
ehuss commentedon Aug 14, 2024
@Amanieu Can this be closed now?
asm_const
andconst_refs_to_static
#129462Rollup merge of #128570 - folkertdev:stabilize-asm-const, r=Amanieu