aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2021-11-29 17:41:43 -0500
committerRich Felker <dalias@aerifal.cx>2021-11-29 17:41:43 -0500
commit8274aaaaa1948c50c661aa32e21b3db27a5c0eab (patch)
tree81dba18b46dca223a565aaefe94869236d719491 /src
parent3733c831f293b3bbfd0e51faec8ee71112c62c3e (diff)
downloadmusl-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.
Diffstat (limited to 'src')
-rw-r--r--src/setjmp/powerpc/longjmp.S2
-rw-r--r--src/setjmp/powerpc/setjmp.S2
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) */