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