mirror of git://git.musl-libc.org/musl
optimize arm setjmp/longjmp register saving/loading
the original code was wrongly based on how it would be done in thumb mode, but that's not needed because musl's asm only targets arm.
This commit is contained in:
parent
e1b9c1b01b
commit
5aac5e2189
|
@ -7,9 +7,7 @@ longjmp:
|
|||
mov ip,r0
|
||||
movs r0,r1
|
||||
moveq r0,#1
|
||||
ldmia ip!, {v1,v2,v3,v4,v5,v6,sl,fp}
|
||||
ldr sp,[ip],#4
|
||||
ldr lr,[ip],#4
|
||||
ldmia ip!, {v1,v2,v3,v4,v5,v6,sl,fp,sp,lr}
|
||||
tst lr,#1
|
||||
moveq pc,lr
|
||||
bx lr
|
||||
|
|
|
@ -8,9 +8,7 @@ __setjmp:
|
|||
_setjmp:
|
||||
setjmp:
|
||||
mov ip,r0
|
||||
stmia ip!,{v1,v2,v3,v4,v5,v6,sl,fp}
|
||||
mov r2,sp
|
||||
stmia ip!,{r2,lr}
|
||||
stmia ip!,{v1,v2,v3,v4,v5,v6,sl,fp,sp,lr}
|
||||
mov r0,#0
|
||||
tst lr,#1
|
||||
moveq pc,lr
|
||||
|
|
Loading…
Reference in New Issue