ce426f
# commit 02f04a6c7fea2b474b026bbce721d8c658d71fda
ce426f
# Author: Alan Modra <amodra@gmail.com>
ce426f
# Date:   Sat Aug 17 18:36:11 2013 +0930
ce426f
# 
ce426f
#     PowerPC LE _dl_hwcap access
ce426f
#     http://sourceware.org/ml/libc-alpha/2013-08/msg00091.html
ce426f
#     
ce426f
#     More LE support, correcting word accesses to _dl_hwcap.
ce426f
#     
ce426f
#         * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S: Use
ce426f
#         HIWORD/LOWORD.
ce426f
#         * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S: Ditto.
ce426f
#         * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S: Ditto.
ce426f
# 
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
ce426f
--- glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S	2014-05-27 23:25:35.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S	2014-05-27 23:25:38.000000000 -0500
ce426f
@@ -151,15 +151,15 @@
ce426f
 #   ifdef SHARED
ce426f
 	lwz     r7,_rtld_global_ro@got(r7)
ce426f
 	mtlr    r8
ce426f
-	lwz     r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r7)
ce426f
+	lwz     r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+LOWORD(r7)
ce426f
 #   else
ce426f
 	lwz     r7,_dl_hwcap@got(r7)
ce426f
 	mtlr    r8
ce426f
-	lwz     r7,4(r7)
ce426f
+	lwz     r7,LOWORD(r7)
ce426f
 #   endif
ce426f
 #  else
ce426f
-	lis	r7,(_dl_hwcap+4)@ha
ce426f
-	lwz     r7,(_dl_hwcap+4)@l(r7)
ce426f
+	lis	r7,(_dl_hwcap+LOWORD)@ha
ce426f
+	lwz     r7,(_dl_hwcap+LOWORD)@l(r7)
ce426f
 #  endif
ce426f
 	andis.	r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16)
ce426f
 
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
ce426f
--- glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S	2014-05-27 23:25:35.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S	2014-05-27 23:25:38.000000000 -0500
ce426f
@@ -79,15 +79,15 @@
ce426f
 # ifdef SHARED
ce426f
 	lwz     r7,_rtld_global_ro@got(r7)
ce426f
 	mtlr    r8
ce426f
-	lwz     r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r7)
ce426f
+	lwz     r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+LOWORD(r7)
ce426f
 # else
ce426f
 	lwz     r7,_dl_hwcap@got(r7)
ce426f
 	mtlr    r8
ce426f
-	lwz     r7,4(r7)
ce426f
+	lwz     r7,LOWORD(r7)
ce426f
 # endif
ce426f
 #else
ce426f
-	lis	r7,(_dl_hwcap+4)@ha
ce426f
-	lwz     r7,(_dl_hwcap+4)@l(r7)
ce426f
+	lis	r7,(_dl_hwcap+LOWORD)@ha
ce426f
+	lwz     r7,(_dl_hwcap+LOWORD)@l(r7)
ce426f
 #endif
ce426f
 
ce426f
 #ifdef __CONTEXT_ENABLE_FPRS
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
ce426f
--- glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S	2014-05-27 23:25:35.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S	2014-05-27 23:25:38.000000000 -0500
ce426f
@@ -152,15 +152,15 @@
ce426f
 #  ifdef SHARED
ce426f
 	lwz     r7,_rtld_global_ro@got(r7)
ce426f
 	mtlr    r8
ce426f
-	lwz     r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r7)
ce426f
+	lwz     r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+LOWORD(r7)
ce426f
 #  else
ce426f
 	lwz     r7,_dl_hwcap@got(r7)
ce426f
 	mtlr    r8
ce426f
-	lwz     r7,4(r7)
ce426f
+	lwz     r7,LOWORD(r7)
ce426f
 #  endif
ce426f
 # else
ce426f
-	lis	r7,(_dl_hwcap+4)@ha
ce426f
-	lwz     r7,(_dl_hwcap+4)@l(r7)
ce426f
+	lis	r7,(_dl_hwcap+LOWORD)@ha
ce426f
+	lwz     r7,(_dl_hwcap+LOWORD)@l(r7)
ce426f
 # endif
ce426f
 
ce426f
 # ifdef __CONTEXT_ENABLE_VRS
ce426f
@@ -308,14 +308,14 @@
ce426f
 	mtlr    r8
ce426f
 #   ifdef SHARED
ce426f
 	lwz     r7,_rtld_global_ro@got(r7)
ce426f
-	lwz     r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r7)
ce426f
+	lwz     r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+LOWORD(r7)
ce426f
 #   else
ce426f
 	lwz     r7,_dl_hwcap@got(r7)
ce426f
-	lwz     r7,4(r7)
ce426f
+	lwz     r7,LOWORD(r7)
ce426f
 #   endif
ce426f
 #  else
ce426f
-	lis	r7,(_dl_hwcap+4)@ha
ce426f
-	lwz     r7,(_dl_hwcap+4)@l(r7)
ce426f
+	lis	r7,(_dl_hwcap+LOWORD)@ha
ce426f
+	lwz     r7,(_dl_hwcap+LOWORD)@l(r7)
ce426f
 #  endif
ce426f
 	andis.	r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16)
ce426f
 	la	r10,(_UC_VREGS)(r31)