mirror of
git://git.musl-libc.org/musl
synced 2025-01-17 04:11:12 +00:00
make arm setjmp/longjmp asm thumb2-compatible
sp cannot be used in the ldm/stm register set in thumb mode.
This commit is contained in:
parent
61ff1af76f
commit
fbbeda172d
@ -8,7 +8,9 @@ longjmp:
|
||||
mov ip,r0
|
||||
movs r0,r1
|
||||
moveq r0,#1
|
||||
ldmia ip!, {v1,v2,v3,v4,v5,v6,sl,fp,sp,lr}
|
||||
ldmia ip!, {v1,v2,v3,v4,v5,v6,sl,fp}
|
||||
ldmia ip!, {r2,lr}
|
||||
mov sp,r2
|
||||
|
||||
adr r1,1f
|
||||
ldr r2,1f
|
||||
|
@ -9,7 +9,9 @@ __setjmp:
|
||||
_setjmp:
|
||||
setjmp:
|
||||
mov ip,r0
|
||||
stmia ip!,{v1,v2,v3,v4,v5,v6,sl,fp,sp,lr}
|
||||
stmia ip!,{v1,v2,v3,v4,v5,v6,sl,fp}
|
||||
mov r2,sp
|
||||
stmia ip!,{r2,lr}
|
||||
mov r0,#0
|
||||
|
||||
adr r1,1f
|
||||
|
Loading…
Reference in New Issue
Block a user