bdc76f
commit e8023f2685c9f97e72bbe9d2a9c968e0d8438371
bdc76f
Author: Stefan Liebler <stli@linux.ibm.com>
bdc76f
Date:   Tue Dec 18 13:57:03 2018 +0100
bdc76f
bdc76f
    S390: Use hwcap instead of dl_hwcap in ifunc-resolvers.
bdc76f
    
bdc76f
    The renaming of hwcap arguments in ifunc-resolvers is needed
bdc76f
    in order to prepare for further commits which refactors
bdc76f
    ifunc handling for memset, memcmp, and memcpy.  Now you are able
bdc76f
    to use s390_libc_ifunc_init which stores the stfle bits
bdc76f
    within the expression for an ifunc-resolver generated by
bdc76f
    s390_libc_ifunc_expr.
bdc76f
    
bdc76f
    ChangeLog:
bdc76f
    
bdc76f
            * sysdeps/s390/multiarch/ifunc-resolve.h
bdc76f
            (s390_libc_ifunc_init, s390_libc_ifunc,
bdc76f
            s390_vx_libc_ifunc2_redirected): Use hwcap instead of dl_hwcap.
bdc76f
bdc76f
diff --git a/sysdeps/s390/multiarch/ifunc-resolve.h b/sysdeps/s390/multiarch/ifunc-resolve.h
bdc76f
index b42ed922fd27834b..b7e20abc59638251 100644
bdc76f
--- a/sysdeps/s390/multiarch/ifunc-resolve.h
bdc76f
+++ b/sysdeps/s390/multiarch/ifunc-resolve.h
bdc76f
@@ -42,9 +42,9 @@
bdc76f
 		       : : "cc");
bdc76f
 #define s390_libc_ifunc_init()						\
bdc76f
   unsigned long long stfle_bits = 0ULL;					\
bdc76f
-  if (__glibc_likely((dl_hwcap & HWCAP_S390_STFLE)			\
bdc76f
-		     && (dl_hwcap & HWCAP_S390_ZARCH)			\
bdc76f
-		     && (dl_hwcap & HWCAP_S390_HIGH_GPRS)))		\
bdc76f
+  if (__glibc_likely ((hwcap & HWCAP_S390_STFLE)			\
bdc76f
+		      && (hwcap & HWCAP_S390_ZARCH)			\
bdc76f
+		      && (hwcap & HWCAP_S390_HIGH_GPRS)))		\
bdc76f
     {									\
bdc76f
       S390_STORE_STFLE (stfle_bits);					\
bdc76f
     }
bdc76f
@@ -61,7 +61,7 @@
bdc76f
 	   : __glibc_likely (S390_IS_Z10 (stfle_bits))			\
bdc76f
 	     ? RESOLVERFUNC##_z10					\
bdc76f
 	     : RESOLVERFUNC##_default,					\
bdc76f
-	   unsigned long int dl_hwcap, s390_libc_ifunc_init);
bdc76f
+	   unsigned long int hwcap, s390_libc_ifunc_init);
bdc76f
 
bdc76f
 #define s390_vx_libc_ifunc(FUNC)		\
bdc76f
   s390_vx_libc_ifunc2_redirected(FUNC, FUNC, FUNC)
bdc76f
@@ -79,10 +79,10 @@
bdc76f
   extern __typeof (TYPE_FUNC) RESOLVERFUNC##_vx attribute_hidden;	\
bdc76f
   extern __typeof (TYPE_FUNC) RESOLVERFUNC##_c attribute_hidden;	\
bdc76f
   __ifunc (TYPE_FUNC, FUNC,						\
bdc76f
-	   (dl_hwcap & HWCAP_S390_VX)					\
bdc76f
+	   (hwcap & HWCAP_S390_VX)					\
bdc76f
 	   ? RESOLVERFUNC##_vx						\
bdc76f
 	   : RESOLVERFUNC##_c,						\
bdc76f
-	   unsigned long int dl_hwcap, s390_vx_libc_ifunc_init);
bdc76f
+	   unsigned long int hwcap, s390_vx_libc_ifunc_init);
bdc76f
 
bdc76f
 #define s390_libc_ifunc_expr_init()
bdc76f
 #define s390_libc_ifunc_expr(TYPE_FUNC, FUNC, EXPR)		\