about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTomoaki Kawada <kawada@kmckk.co.jp>2021-11-08 18:27:24 +0900
committerTomoaki Kawada <kawada@kmckk.co.jp>2021-11-08 19:13:31 +0900
commitf17077002bb8b40aa34fc09316f3dc44309dc589 (patch)
tree46acb1a3b29fb6ff853b4af551936fd4fb3b6405
parent43192ca3d72ed0ca42ba913137585219ba0a691f (diff)
downloadrust-f17077002bb8b40aa34fc09316f3dc44309dc589.tar.gz
rust-f17077002bb8b40aa34fc09316f3dc44309dc589.zip
kmc-solid: Avoid the use of `asm_const`
-rw-r--r--library/std/src/sys/solid/abi/mod.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/library/std/src/sys/solid/abi/mod.rs b/library/std/src/sys/solid/abi/mod.rs
index 3526440fb85..3205f0db85f 100644
--- a/library/std/src/sys/solid/abi/mod.rs
+++ b/library/std/src/sys/solid/abi/mod.rs
@@ -4,17 +4,15 @@ mod fs;
 pub mod sockets;
 pub use self::fs::*;
 
-pub const SOLID_BP_PROGRAM_EXITED: usize = 15;
-pub const SOLID_BP_CSABORT: usize = 16;
-
 #[inline(always)]
 pub fn breakpoint_program_exited(tid: usize) {
     unsafe {
         match () {
+            // SOLID_BP_PROGRAM_EXITED = 15
             #[cfg(target_arch = "arm")]
-            () => asm!("bkpt #{}", const SOLID_BP_PROGRAM_EXITED, in("r0") tid),
+            () => asm!("bkpt #15", in("r0") tid),
             #[cfg(target_arch = "aarch64")]
-            () => asm!("hlt #{}", const SOLID_BP_PROGRAM_EXITED, in("x0") tid),
+            () => asm!("hlt #15", in("x0") tid),
         }
     }
 }
@@ -23,10 +21,11 @@ pub fn breakpoint_program_exited(tid: usize) {
 pub fn breakpoint_abort() {
     unsafe {
         match () {
+            // SOLID_BP_CSABORT = 16
             #[cfg(target_arch = "arm")]
-            () => asm!("bkpt #{}", const SOLID_BP_CSABORT),
+            () => asm!("bkpt #16"),
             #[cfg(target_arch = "aarch64")]
-            () => asm!("hlt #{}", const SOLID_BP_CSABORT),
+            () => asm!("hlt #16"),
         }
     }
 }