diff options
author | Rich Felker <dalias@aerifal.cx> | 2021-11-29 17:41:43 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2021-11-29 17:41:43 -0500 |
commit | 8274aaaaa1948c50c661aa32e21b3db27a5c0eab (patch) | |
tree | 81dba18b46dca223a565aaefe94869236d719491 | |
parent | 3733c831f293b3bbfd0e51faec8ee71112c62c3e (diff) | |
download | musl-8274aaaaa1948c50c661aa32e21b3db27a5c0eab.tar.gz musl-8274aaaaa1948c50c661aa32e21b3db27a5c0eab.tar.xz musl-8274aaaaa1948c50c661aa32e21b3db27a5c0eab.zip |
fix hwcap access in powerpc-sf setjmp/longjmp
commit 7be59733d71ada3a32a98622507399253f1d5e48 introduced the hwcap-based branches to support the SPE FPU, but wrongly coded them as bitwise tests on the computed address of __hwcap, not a value loaded from that address. replace the add with indexed load to fix it.
-rw-r--r-- | src/setjmp/powerpc/longjmp.S | 2 | ||||
-rw-r--r-- | src/setjmp/powerpc/setjmp.S | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/setjmp/powerpc/longjmp.S b/src/setjmp/powerpc/longjmp.S index 34aecb4c..611389fe 100644 --- a/src/setjmp/powerpc/longjmp.S +++ b/src/setjmp/powerpc/longjmp.S @@ -44,7 +44,7 @@ longjmp: .long __hwcap-. 1: mflr 4 lwz 5, 0(4) - add 4, 4, 5 + lwzx 4, 4, 5 andis. 4, 4, 0x80 beq 1f .long 0x11c35b01 /* evldd 14,88(3) */ diff --git a/src/setjmp/powerpc/setjmp.S b/src/setjmp/powerpc/setjmp.S index 413e6a81..f1fcce33 100644 --- a/src/setjmp/powerpc/setjmp.S +++ b/src/setjmp/powerpc/setjmp.S @@ -44,7 +44,7 @@ setjmp: .long __hwcap-. 1: mflr 4 lwz 5, 0(4) - add 4, 4, 5 + lwzx 4, 4, 5 andis. 4, 4, 0x80 beq 1f .long 0x11c35b21 /* evstdd 14,88(3) */ |