add registers to sqrt clobber list

will need to go through the other syscalls and find out whether we need
to add registers to the clobber list. We probably need to add all per
the call convention (r0, r1, r2, r3 are callee saved).
This commit is contained in:
Corwin Kuiper 2021-10-31 20:14:41 +00:00
parent 5c10af2f72
commit 7ba84b7691

View file

@ -77,6 +77,9 @@ pub fn sqrt(n: i32) -> i32 {
"swi 0x08",
in("r0") n,
lateout("r0") result,
lateout("r1") _,
lateout("r2") _,
lateout("r3") _
);
}
result
@ -102,6 +105,7 @@ pub fn arc_tan2(x: i16, y: i32) -> i16 {
in("r0") x,
in("r1") y,
lateout("r0") result,
);
}
result