path: root/src/thread
diff options
authorPatrick Oppenlander <>2019-08-01 14:34:59 +1000
committerRich Felker <>2019-08-06 14:03:56 -0400
commite0e8ae754cc7653fcff489a0e229adbbb49fde6c (patch)
tree9c1fb95924eabf2c6e6b524dde515313ef611694 /src/thread
parent49eacf29d29fa704b2feda879978ae64a825358c (diff)
in arm cancellation point asm, don't unnecessarily preserve link register
The only reason we needed to preserve the link register was because we were using a branch-link instruction to branch to __cp_cancel. Replacing this with a branch means we can avoid the save/restore as the link register is no longer modified.
Diffstat (limited to 'src/thread')
1 files changed, 4 insertions, 4 deletions
diff --git a/src/thread/arm/syscall_cp.s b/src/thread/arm/syscall_cp.s
index a5730c08..e607dd42 100644
--- a/src/thread/arm/syscall_cp.s
+++ b/src/thread/arm/syscall_cp.s
@@ -11,19 +11,19 @@
.type __syscall_cp_asm,%function
mov ip,sp
- stmfd sp!,{r4,r5,r6,r7,lr}
+ stmfd sp!,{r4,r5,r6,r7}
ldr r0,[r0]
cmp r0,#0
- blne __cp_cancel
+ bne __cp_cancel
mov r7,r1
mov r0,r2
mov r1,r3
ldmfd ip,{r2,r3,r4,r5,r6}
svc 0
- ldmfd sp!,{r4,r5,r6,r7,lr}
+ ldmfd sp!,{r4,r5,r6,r7}
bx lr
- ldmfd sp!,{r4,r5,r6,r7,lr}
+ ldmfd sp!,{r4,r5,r6,r7}
b __cancel