d8307d
commit 80190d2b0e3f48d973724218f37d2da5bf1a20ab
d8307d
Author: Stefan Liebler <stli@linux.ibm.com>
d8307d
Date:   Tue Dec 18 13:57:25 2018 +0100
d8307d
d8307d
    S390: Cleanup ifunc-resolve.h.
d8307d
    
d8307d
    The ifunc macros s390_vx_libc* are no longer used and
d8307d
    can be removed as all users are now relying on
d8307d
    s390_libc_ifunc_expr.
d8307d
    
d8307d
    The same applies to s390_libc_ifunc.  The macro
d8307d
    s390_libc_ifunc_init is now renamed to
d8307d
    s390_libc_ifunc_expr_stfle_init and the users are
d8307d
    adjusted accordingly.
d8307d
    
d8307d
    ChangeLog:
d8307d
    
d8307d
            * sysdeps/s390/multiarch/ifunc-resolve.h
d8307d
            (s390_vx_libc_ifunc, s390_vx_libc_ifunc_redirected,
d8307d
            s390_vx_libc_ifunc2, s390_vx_libc_ifunc_init,
d8307d
            s390_vx_libc_ifunc2_redirected, s390_libc_ifunc):
d8307d
            Delete macro definition.
d8307d
            (s390_libc_ifunc_init): Rename to
d8307d
            s390_libc_ifunc_expr_stfle_init.
d8307d
            * sysdeps/s390/bzero: Use
d8307d
            s390_libc_ifunc_expr_stfle_init instead of
d8307d
            s390_libc_ifunc_init.
d8307d
            * sysdeps/s390/memcmp.c: Likewise.
d8307d
            * sysdeps/s390/memcpy.c: Likewise.
d8307d
            * sysdeps/s390/mempcpy.c: Likewise.
d8307d
            * sysdeps/s390/memset.c: Likewise.
d8307d
d8307d
diff --git a/sysdeps/s390/bzero.c b/sysdeps/s390/bzero.c
d8307d
index 9f8d95781bf2fb68..6b5d471c40250543 100644
d8307d
--- a/sysdeps/s390/bzero.c
d8307d
+++ b/sysdeps/s390/bzero.c
d8307d
@@ -35,7 +35,7 @@ extern __typeof (__bzero) BZERO_Z196 attribute_hidden;
d8307d
 
d8307d
 s390_libc_ifunc_expr (__bzero, __bzero,
d8307d
 		      ({
d8307d
-			s390_libc_ifunc_init ();
d8307d
+			s390_libc_ifunc_expr_stfle_init ();
d8307d
 			(HAVE_MEMSET_Z196 && S390_IS_Z196 (stfle_bits))
d8307d
 			  ? BZERO_Z196
d8307d
 			  : (HAVE_MEMSET_Z10 && S390_IS_Z10 (stfle_bits))
d8307d
diff --git a/sysdeps/s390/memcmp.c b/sysdeps/s390/memcmp.c
d8307d
index 952ff6af7364fd92..6d9276320abbe332 100644
d8307d
--- a/sysdeps/s390/memcmp.c
d8307d
+++ b/sysdeps/s390/memcmp.c
d8307d
@@ -37,7 +37,7 @@ extern __typeof (__redirect_memcmp) MEMCMP_Z196 attribute_hidden;
d8307d
 
d8307d
 s390_libc_ifunc_expr (__redirect_memcmp, memcmp,
d8307d
 		      ({
d8307d
-			s390_libc_ifunc_init ();
d8307d
+			s390_libc_ifunc_expr_stfle_init ();
d8307d
 			(HAVE_MEMCMP_Z196 && S390_IS_Z196 (stfle_bits))
d8307d
 			  ? MEMCMP_Z196
d8307d
 			  : (HAVE_MEMCMP_Z10 && S390_IS_Z10 (stfle_bits))
d8307d
diff --git a/sysdeps/s390/memcpy.c b/sysdeps/s390/memcpy.c
d8307d
index 90a53ac27d4be755..0ff24f18cf3600da 100644
d8307d
--- a/sysdeps/s390/memcpy.c
d8307d
+++ b/sysdeps/s390/memcpy.c
d8307d
@@ -38,7 +38,7 @@ extern __typeof (__redirect_memcpy) MEMCPY_Z196 attribute_hidden;
d8307d
 
d8307d
 s390_libc_ifunc_expr (__redirect_memcpy, memcpy,
d8307d
 		      ({
d8307d
-			s390_libc_ifunc_init ();
d8307d
+			s390_libc_ifunc_expr_stfle_init ();
d8307d
 			(HAVE_MEMCPY_Z196 && S390_IS_Z196 (stfle_bits))
d8307d
 			  ? MEMCPY_Z196
d8307d
 			  : (HAVE_MEMCPY_Z10 && S390_IS_Z10 (stfle_bits))
d8307d
diff --git a/sysdeps/s390/mempcpy.c b/sysdeps/s390/mempcpy.c
d8307d
index a6a237312659c2c1..b687b3362034bfb0 100644
d8307d
--- a/sysdeps/s390/mempcpy.c
d8307d
+++ b/sysdeps/s390/mempcpy.c
d8307d
@@ -42,7 +42,7 @@ extern __typeof (__redirect___mempcpy) MEMPCPY_Z196 attribute_hidden;
d8307d
 
d8307d
 s390_libc_ifunc_expr (__redirect___mempcpy, __mempcpy,
d8307d
 		      ({
d8307d
-			s390_libc_ifunc_init ();
d8307d
+			s390_libc_ifunc_expr_stfle_init ();
d8307d
 			(HAVE_MEMCPY_Z196 && S390_IS_Z196 (stfle_bits))
d8307d
 			  ? MEMPCPY_Z196
d8307d
 			  : (HAVE_MEMCPY_Z10 && S390_IS_Z10 (stfle_bits))
d8307d
diff --git a/sysdeps/s390/memset.c b/sysdeps/s390/memset.c
d8307d
index 57a35aebc7d3c794..75b011f1a24f39bc 100644
d8307d
--- a/sysdeps/s390/memset.c
d8307d
+++ b/sysdeps/s390/memset.c
d8307d
@@ -37,7 +37,7 @@ extern __typeof (__redirect_memset) MEMSET_Z196 attribute_hidden;
d8307d
 
d8307d
 s390_libc_ifunc_expr (__redirect_memset, memset,
d8307d
 		      ({
d8307d
-			s390_libc_ifunc_init ();
d8307d
+			s390_libc_ifunc_expr_stfle_init ();
d8307d
 			(HAVE_MEMSET_Z196 && S390_IS_Z196 (stfle_bits))
d8307d
 			  ? MEMSET_Z196
d8307d
 			  : (HAVE_MEMSET_Z10 && S390_IS_Z10 (stfle_bits))
d8307d
diff --git a/sysdeps/s390/multiarch/ifunc-resolve.h b/sysdeps/s390/multiarch/ifunc-resolve.h
d8307d
index b7e20abc59638251..b2be015401313d4b 100644
d8307d
--- a/sysdeps/s390/multiarch/ifunc-resolve.h
d8307d
+++ b/sysdeps/s390/multiarch/ifunc-resolve.h
d8307d
@@ -40,7 +40,7 @@
d8307d
 		       ".machine pop"         "\n"			\
d8307d
 		       : "=QS" (STFLE_BITS), "+d" (reg0)		\
d8307d
 		       : : "cc");
d8307d
-#define s390_libc_ifunc_init()						\
d8307d
+#define s390_libc_ifunc_expr_stfle_init()				\
d8307d
   unsigned long long stfle_bits = 0ULL;					\
d8307d
   if (__glibc_likely ((hwcap & HWCAP_S390_STFLE)			\
d8307d
 		      && (hwcap & HWCAP_S390_ZARCH)			\
d8307d
@@ -49,41 +49,6 @@
d8307d
       S390_STORE_STFLE (stfle_bits);					\
d8307d
     }
d8307d
 
d8307d
-#define s390_libc_ifunc(TYPE_FUNC, RESOLVERFUNC, FUNC)			\
d8307d
-  /* Make the declarations of the optimized functions hidden in order
d8307d
-     to prevent GOT slots being generated for them. */			\
d8307d
-  extern __typeof (TYPE_FUNC) RESOLVERFUNC##_z196 attribute_hidden;	\
d8307d
-  extern __typeof (TYPE_FUNC) RESOLVERFUNC##_z10 attribute_hidden;      \
d8307d
-  extern __typeof (TYPE_FUNC) RESOLVERFUNC##_default attribute_hidden;  \
d8307d
-  __ifunc (TYPE_FUNC, FUNC,						\
d8307d
-	   __glibc_likely (S390_IS_Z196 (stfle_bits))			\
d8307d
-	   ? RESOLVERFUNC##_z196					\
d8307d
-	   : __glibc_likely (S390_IS_Z10 (stfle_bits))			\
d8307d
-	     ? RESOLVERFUNC##_z10					\
d8307d
-	     : RESOLVERFUNC##_default,					\
d8307d
-	   unsigned long int hwcap, s390_libc_ifunc_init);
d8307d
-
d8307d
-#define s390_vx_libc_ifunc(FUNC)		\
d8307d
-  s390_vx_libc_ifunc2_redirected(FUNC, FUNC, FUNC)
d8307d
-
d8307d
-#define s390_vx_libc_ifunc_redirected(TYPE_FUNC, FUNC)	\
d8307d
-  s390_vx_libc_ifunc2_redirected(TYPE_FUNC, FUNC, FUNC)
d8307d
-
d8307d
-#define s390_vx_libc_ifunc2(RESOLVERFUNC, FUNC)	\
d8307d
-  s390_vx_libc_ifunc2_redirected(FUNC, RESOLVERFUNC, FUNC)
d8307d
-
d8307d
-#define s390_vx_libc_ifunc_init()
d8307d
-#define s390_vx_libc_ifunc2_redirected(TYPE_FUNC, RESOLVERFUNC, FUNC)	\
d8307d
-  /* Make the declarations of the optimized functions hidden in order
d8307d
-     to prevent GOT slots being generated for them.  */			\
d8307d
-  extern __typeof (TYPE_FUNC) RESOLVERFUNC##_vx attribute_hidden;	\
d8307d
-  extern __typeof (TYPE_FUNC) RESOLVERFUNC##_c attribute_hidden;	\
d8307d
-  __ifunc (TYPE_FUNC, FUNC,						\
d8307d
-	   (hwcap & HWCAP_S390_VX)					\
d8307d
-	   ? RESOLVERFUNC##_vx						\
d8307d
-	   : RESOLVERFUNC##_c,						\
d8307d
-	   unsigned long int hwcap, s390_vx_libc_ifunc_init);
d8307d
-
d8307d
 #define s390_libc_ifunc_expr_init()
d8307d
 #define s390_libc_ifunc_expr(TYPE_FUNC, FUNC, EXPR)		\
d8307d
   __ifunc (TYPE_FUNC, FUNC, EXPR, unsigned long int hwcap,	\