diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-07-27 00:17:09 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-07-27 00:17:09 -0400 |
commit | 5aac5e2189f322a54a49958d928f30e1c9505561 (patch) | |
tree | 258ba3778b2a1d8c474e31f2a510dd710e1506dd /src | |
parent | e1b9c1b01be294cc2865acfe33544d5e5cc50eb4 (diff) | |
download | musl-5aac5e2189f322a54a49958d928f30e1c9505561.tar.gz musl-5aac5e2189f322a54a49958d928f30e1c9505561.tar.bz2 musl-5aac5e2189f322a54a49958d928f30e1c9505561.tar.xz musl-5aac5e2189f322a54a49958d928f30e1c9505561.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/setjmp/arm/longjmp.s | 4 | ||||
-rw-r--r-- | src/setjmp/arm/setjmp.s | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/setjmp/arm/longjmp.s b/src/setjmp/arm/longjmp.s index 037cb3d3..690a0089 100644 --- a/src/setjmp/arm/longjmp.s +++ b/src/setjmp/arm/longjmp.s @@ -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 diff --git a/src/setjmp/arm/setjmp.s b/src/setjmp/arm/setjmp.s index 41e02d82..6985caab 100644 --- a/src/setjmp/arm/setjmp.s +++ b/src/setjmp/arm/setjmp.s @@ -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 |