about summary refs log tree commit diff
path: root/library/panic_abort/src
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2021-12-10 00:15:33 +0000
committerAmanieu d'Antras <amanieu@gmail.com>2021-12-12 11:20:03 +0000
commit44a3a66ee890545a2c1ac78ff8f107fe5e7204f9 (patch)
tree8821e53e6c339fca0b3fc58e34fc702a0866d087 /library/panic_abort/src
parentb3a55371a72f665f5d9476d07980e76d3e755fe6 (diff)
downloadrust-44a3a66ee890545a2c1ac78ff8f107fe5e7204f9.tar.gz
rust-44a3a66ee890545a2c1ac78ff8f107fe5e7204f9.zip
Stabilize asm! and global_asm!
They are also removed from the prelude as per the decision in
https://github.com/rust-lang/rust/issues/87228.

stdarch and compiler-builtins are updated to work with the new, stable
asm! and global_asm! macros.
Diffstat (limited to 'library/panic_abort/src')
-rw-r--r--library/panic_abort/src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/library/panic_abort/src/lib.rs b/library/panic_abort/src/lib.rs
index dec5e0b2123..5c5632a9d01 100644
--- a/library/panic_abort/src/lib.rs
+++ b/library/panic_abort/src/lib.rs
@@ -14,7 +14,6 @@
 #![feature(std_internals)]
 #![feature(staged_api)]
 #![feature(rustc_attrs)]
-#![feature(asm)]
 #![feature(c_unwind)]
 
 #[cfg(target_os = "android")]
@@ -69,11 +68,11 @@ pub unsafe extern "C-unwind" fn __rust_start_panic(_payload: *mut &mut dyn BoxMe
                 const FAST_FAIL_FATAL_APP_EXIT: usize = 7;
                 cfg_if::cfg_if! {
                     if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
-                        asm!("int $$0x29", in("ecx") FAST_FAIL_FATAL_APP_EXIT);
+                        core::arch::asm!("int $$0x29", in("ecx") FAST_FAIL_FATAL_APP_EXIT);
                     } else if #[cfg(all(target_arch = "arm", target_feature = "thumb-mode"))] {
-                        asm!(".inst 0xDEFB", in("r0") FAST_FAIL_FATAL_APP_EXIT);
+                        core::arch::asm!(".inst 0xDEFB", in("r0") FAST_FAIL_FATAL_APP_EXIT);
                     } else if #[cfg(target_arch = "aarch64")] {
-                        asm!("brk 0xF003", in("x0") FAST_FAIL_FATAL_APP_EXIT);
+                        core::arch::asm!("brk 0xF003", in("x0") FAST_FAIL_FATAL_APP_EXIT);
                     } else {
                         core::intrinsics::abort();
                     }