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