aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Greig <adam@adamgreig.com> 2022-05-16 00:06:43 +0100
committerGravatar Adam Greig <adam@adamgreig.com> 2022-05-17 18:57:38 +0100
commitbba4f0f83287b2c642f074cbcc96312ca7688135 (patch)
tree60fee9596f4e85344aac3f889741f8891d0b4e4d
parent45406f6a667f11b459dad51cf45e2739d23a381b (diff)
downloadcortex-m-bba4f0f83287b2c642f074cbcc96312ca7688135.tar.gz
cortex-m-bba4f0f83287b2c642f074cbcc96312ca7688135.tar.zst
cortex-m-bba4f0f83287b2c642f074cbcc96312ca7688135.zip
Swap cortex-m-semihosting to use asm instead of llvm_asm
-rw-r--r--cortex-m-semihosting/src/lib.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/cortex-m-semihosting/src/lib.rs b/cortex-m-semihosting/src/lib.rs
index a67b84d..721ac45 100644
--- a/cortex-m-semihosting/src/lib.rs
+++ b/cortex-m-semihosting/src/lib.rs
@@ -153,8 +153,7 @@
//!
//! ## `inline-asm`
//!
-//! When this feature is enabled semihosting is implemented using inline assembly (`llvm_asm!`) and
-//! compiling this crate requires nightly.
+//! When this feature is enabled semihosting is implemented using inline assembly (`asm!`).
//!
//! When this feature is disabled semihosting is implemented using FFI calls into an external
//! assembly file and compiling this crate works on stable and beta.
@@ -179,7 +178,6 @@
//!
//! [pdf]: http://infocenter.arm.com/help/topic/com.arm.doc.dui0471e/DUI0471E_developing_for_arm_processors.pdf
-#![cfg_attr(feature = "inline-asm", feature(llvm_asm))]
#![deny(missing_docs)]
#![no_std]
@@ -213,7 +211,7 @@ pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize {
#[cfg(all(thumb, feature = "inline-asm", not(feature = "no-semihosting")))]
() => {
let mut nr = _nr;
- llvm_asm!("bkpt 0xAB" : "+{r0}"(nr) : "{r1}"(_arg) :: "volatile");
+ core::arch::asm!("bkpt #0xab", inout("r0") nr, in("r1") _arg, options(nostack, preserves_flags));
nr
}