From 3e8a5beec5f96a3c219b840dc26df34f76e4ab1e Mon Sep 17 00:00:00 2001 From: Adam Greig Date: Fri, 25 Feb 2022 01:19:34 +0000 Subject: Fix cortex-m-rt qemu test by removing 'nomem' from semihosting_syscall asm, add inline to most cortex_m::asm methods --- cortex-m-semihosting/src/lib.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'cortex-m-semihosting') diff --git a/cortex-m-semihosting/src/lib.rs b/cortex-m-semihosting/src/lib.rs index 4ff975d..186e7e7 100644 --- a/cortex-m-semihosting/src/lib.rs +++ b/cortex-m-semihosting/src/lib.rs @@ -194,20 +194,9 @@ pub unsafe fn syscall(nr: usize, arg: &T) -> usize { pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize { match () { #[cfg(all(thumb, not(feature = "no-semihosting")))] - () => { - let mut nr = _nr; - core::arch::asm!( - "bkpt #0xab", - inout("r0") nr, - in("r1") _arg, - options(nomem, nostack, preserves_flags) - ); - nr - } - + () => cortex_m::asm::semihosting_syscall(_nr as u32, _arg as u32) as usize, #[cfg(all(thumb, feature = "no-semihosting"))] () => 0, - #[cfg(not(thumb))] () => unimplemented!(), } -- cgit v1.2.3