Skip to content

Commit cc09cb0

Browse files
committed
implement naked_asm macro
1 parent dbb2281 commit cc09cb0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

core/src/arch.rs

+14
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,17 @@ pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?)
7777
pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?) {
7878
/* compiler built-in */
7979
}
80+
81+
/// Inline assembly used in combination with `#[naked]` functions.
82+
///
83+
/// Refer to [Rust By Example] for a usage guide and the [reference] for
84+
/// detailed information about the syntax and available options.
85+
///
86+
/// [Rust By Example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
87+
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
88+
#[unstable(feature = "naked_functions", issue = "90957")]
89+
#[rustc_builtin_macro]
90+
#[cfg(not(bootstrap))]
91+
pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?) {
92+
/* compiler built-in */
93+
}

0 commit comments

Comments
 (0)