Open nbdd0121 opened 6 months ago
Where is this coming from? Is there a lang MCP or anything like that?
This is outlined as a future possibility in RFC2873 which I am implementing in #119365.
Could we support a named label rather than being only positional? Maybe
unsafe { asm!(
"jmp {foo}",
label foo {
println!("Jumped from asm!");
}
);}
(I mean that foo
would be the alias for use in the format string, not that the label in assembly would wind up as foo:
)
unsafe { asm!(
"jmp {foo}",
foo = label {
println!("Jumped from asm!");
}
);}
is closer to the syntax used by other operands.
oh, that does actually work already. Awesome
The feature gate for the issue is
#![feature(asm_goto)]
.Summary
This feature adds a
label<block>
operand type toasm!
.Example:
The block must have unit type.
Steps
Unresolved Questions
@rustbot labels: +A-inline-assembly +F-asm