Skip to content

Commit 9437b11

Browse files
authored
Move asm! and global_asm! to core::arch (#1183)
1 parent 3001c75 commit 9437b11

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

crates/core_arch/src/mod.rs

+26
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,32 @@ mod simd;
1111
#[doc = include_str!("core_arch_docs.md")]
1212
#[stable(feature = "simd_arch", since = "1.27.0")]
1313
pub mod arch {
14+
/// Inline assembly.
15+
///
16+
/// Read the [unstable book] for the usage.
17+
///
18+
/// [unstable book]: ../unstable-book/library-features/asm.html
19+
#[unstable(
20+
feature = "asm",
21+
issue = "72016",
22+
reason = "inline assembly is not stable enough for use and is subject to change"
23+
)]
24+
#[rustc_builtin_macro]
25+
pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {
26+
/* compiler built-in */
27+
}
28+
29+
/// Module-level inline assembly.
30+
#[unstable(
31+
feature = "global_asm",
32+
issue = "35119",
33+
reason = "`global_asm!` is not stable enough for use and is subject to change"
34+
)]
35+
#[rustc_builtin_macro]
36+
pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?) {
37+
/* compiler built-in */
38+
}
39+
1440
/// Platform-specific intrinsics for the `x86` platform.
1541
///
1642
/// See the [module documentation](../index.html) for more details.

0 commit comments

Comments
 (0)