We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
lr
1 parent ac32033 commit c953ad9Copy full SHA for c953ad9
src/arm_semihosting/src/lib.rs
@@ -75,7 +75,7 @@ pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize {
75
#[cfg(all(thumb, arm, not(feature = "no-semihosting")))]
76
() => {
77
let mut nr = _nr;
78
- llvm_asm!("svc 0xAB" : "+{r0}"(nr) : "{r1}"(_arg) :: "volatile");
+ llvm_asm!("svc 0xAB" : "+{r0}"(nr) : "{r1}"(_arg) : "lr" : "volatile");
79
nr
80
}
81
@@ -85,7 +85,7 @@ pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize {
85
#[cfg(all(not(thumb), arm, not(feature = "no-semihosting")))]
86
87
88
- llvm_asm!("svc 0x123456" : "+{r0}"(nr) : "{r1}"(_arg) :: "volatile");
+ llvm_asm!("svc 0x123456" : "+{r0}"(nr) : "{r1}"(_arg) : "lr" : "volatile");
89
90
91
0 commit comments