Skip to content

Commit 6a7b4cf

Browse files
committed
Fix cortex-m-semihosting inline-asm on nightly
1 parent 27434e0 commit 6a7b4cf

File tree

1 file changed

+6
-1
lines changed
  • cortex-m-semihosting/src

1 file changed

+6
-1
lines changed

cortex-m-semihosting/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,12 @@ pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize {
213213
#[cfg(all(thumb, feature = "inline-asm", not(feature = "no-semihosting")))]
214214
() => {
215215
let mut nr = _nr;
216-
llvm_asm!("bkpt 0xAB" : "+{r0}"(nr) : "{r1}"(_arg) :: "volatile");
216+
core::arch::asm!(
217+
"bkpt #0xab",
218+
inout("r0") nr,
219+
in("r1") arg,
220+
options(nomem, nostack, preserves_flags)
221+
);
217222
nr
218223
}
219224

0 commit comments

Comments
 (0)