Skip to content

Commit

Permalink
implement naked_asm macro
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertdev committed Oct 6, 2024
1 parent dbb2281 commit cc09cb0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,17 @@ pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?)
pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?) {
/* compiler built-in */
}

/// Inline assembly used in combination with `#[naked]` functions.
///
/// Refer to [Rust By Example] for a usage guide and the [reference] for
/// detailed information about the syntax and available options.
///
/// [Rust By Example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
#[unstable(feature = "naked_functions", issue = "90957")]
#[rustc_builtin_macro]
#[cfg(not(bootstrap))]
pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?) {
/* compiler built-in */
}

0 comments on commit cc09cb0

Please sign in to comment.