Skip to content

Commit bba4f0f

Browse files
committed
Swap cortex-m-semihosting to use asm instead of llvm_asm
1 parent 45406f6 commit bba4f0f

File tree

1 file changed

+2
-4
lines changed
  • cortex-m-semihosting/src

1 file changed

+2
-4
lines changed

cortex-m-semihosting/src/lib.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@
153153
//!
154154
//! ## `inline-asm`
155155
//!
156-
//! When this feature is enabled semihosting is implemented using inline assembly (`llvm_asm!`) and
157-
//! compiling this crate requires nightly.
156+
//! When this feature is enabled semihosting is implemented using inline assembly (`asm!`).
158157
//!
159158
//! When this feature is disabled semihosting is implemented using FFI calls into an external
160159
//! assembly file and compiling this crate works on stable and beta.
@@ -179,7 +178,6 @@
179178
//!
180179
//! [pdf]: http://infocenter.arm.com/help/topic/com.arm.doc.dui0471e/DUI0471E_developing_for_arm_processors.pdf
181180
182-
#![cfg_attr(feature = "inline-asm", feature(llvm_asm))]
183181
#![deny(missing_docs)]
184182
#![no_std]
185183

@@ -213,7 +211,7 @@ pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize {
213211
#[cfg(all(thumb, feature = "inline-asm", not(feature = "no-semihosting")))]
214212
() => {
215213
let mut nr = _nr;
216-
llvm_asm!("bkpt 0xAB" : "+{r0}"(nr) : "{r1}"(_arg) :: "volatile");
214+
core::arch::asm!("bkpt #0xab", inout("r0") nr, in("r1") _arg, options(nostack, preserves_flags));
217215
nr
218216
}
219217

0 commit comments

Comments
 (0)