Support for const string interpolation into inline assembly #132083
Labels
A-inline-assembly
Area: Inline assembly (`asm!(…)`)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Related to this comment.
Maybe related to #93332
This feature request targets the inline assembly macro
asm!
and globally scope assemblyglobal_asm!
to support direct string interpolation into the assembly template.The semantic works very much like a
format!
in a narrower sense, that only constant string is supported. The proposed macro word isinterpolate $expr
where$expr
is a const-evaluatable expression that yields a&'static str
constant value.An example of how it would work is as follows.
The one and only instantiation of
asm!
macro, when completely expanded through codegen, might have yield the following assembly line.The text was updated successfully, but these errors were encountered: