aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-semihosting/src
diff options
context:
space:
mode:
authorGravatar Adam Greig <adam@adamgreig.com> 2022-02-25 01:19:34 +0000
committerGravatar Adam Greig <adam@adamgreig.com> 2022-02-25 01:21:05 +0000
commit3e8a5beec5f96a3c219b840dc26df34f76e4ab1e (patch)
tree45cfb08fca76efcce333a7f89cb28f32eea8fab9 /cortex-m-semihosting/src
parentf2feeb2595fe8f281a50d63055c65d6ac064ae11 (diff)
downloadcortex-m-3e8a5beec5f96a3c219b840dc26df34f76e4ab1e.tar.gz
cortex-m-3e8a5beec5f96a3c219b840dc26df34f76e4ab1e.tar.zst
cortex-m-3e8a5beec5f96a3c219b840dc26df34f76e4ab1e.zip
Fix cortex-m-rt qemu test by removing 'nomem' from semihosting_syscall asm, add inline to most cortex_m::asm methods
Diffstat (limited to 'cortex-m-semihosting/src')
-rw-r--r--cortex-m-semihosting/src/lib.rs13
1 files changed, 1 insertions, 12 deletions
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<T>(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!(),
}