diff options
Diffstat (limited to 'src/libcore/macros/mod.rs')
| -rw-r--r-- | src/libcore/macros/mod.rs | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/src/libcore/macros/mod.rs b/src/libcore/macros/mod.rs index a0873fe6b62..f67762cd043 100644 --- a/src/libcore/macros/mod.rs +++ b/src/libcore/macros/mod.rs @@ -1307,7 +1307,7 @@ pub(crate) mod builtin { /// [unstable book]: ../unstable-book/library-features/asm.html #[unstable( feature = "asm", - issue = "29722", + issue = "70173", reason = "inline assembly is not stable enough for use and is subject to change" )] #[rustc_builtin_macro] @@ -1322,6 +1322,47 @@ pub(crate) mod builtin { }; } + /// Inline assembly. + /// + /// Read the [unstable book] for the usage. + /// + /// [unstable book]: ../unstable-book/library-features/asm.html + #[cfg(bootstrap)] + #[unstable( + feature = "llvm_asm", + issue = "70173", + reason = "inline assembly is not stable enough for use and is subject to change" + )] + #[macro_export] + #[allow_internal_unstable(asm)] + macro_rules! llvm_asm { + // Redirect to asm! for stage0 + ($($arg:tt)*) => { $crate::asm!($($arg)*) } + } + + /// Inline assembly. + /// + /// Read the [unstable book] for the usage. + /// + /// [unstable book]: ../unstable-book/library-features/asm.html + #[cfg(not(bootstrap))] + #[unstable( + feature = "llvm_asm", + issue = "70173", + reason = "inline assembly is not stable enough for use and is subject to change" + )] + #[rustc_builtin_macro] + #[macro_export] + macro_rules! llvm_asm { + ("assembly template" + : $("output"(operand),)* + : $("input"(operand),)* + : $("clobbers",)* + : $("options",)*) => { + /* compiler built-in */ + }; + } + /// Module-level inline assembly. #[unstable( feature = "global_asm", |
