You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
433 lines
19 KiB
433 lines
19 KiB
8 months ago
|
From e4ca6de1bc5e4ba3f94cf0c501a293c5bc827b10 Mon Sep 17 00:00:00 2001
|
||
|
From: Anton Blanchard <anton@ozlabs.org>
|
||
|
Date: Tue, 27 Jul 2021 15:47:49 +1000
|
||
|
Subject: powerpc64: Replace some PPC_FEATURE_HAS_VSX with
|
||
|
PPC_FEATURE_ARCH_2_06
|
||
|
|
||
|
We use PPC_FEATURE_HAS_VSX to select a number of POWER7 optimised
|
||
|
functions. These functions don't use any VSX instructions, so
|
||
|
PPC_FEATURE_ARCH_2_06 seems like a better fit.
|
||
|
|
||
|
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
|
||
|
index 0acdf22ba3..32564c8f1f 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
|
||
|
@@ -95,7 +95,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
#endif
|
||
|
IFUNC_IMPL_ADD (array, i, memset, hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__memset_power8)
|
||
|
- IFUNC_IMPL_ADD (array, i, memset, hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ IFUNC_IMPL_ADD (array, i, memset, hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__memset_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, memset, hwcap & PPC_FEATURE_ARCH_2_05,
|
||
|
__memset_power6)
|
||
|
@@ -139,7 +139,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
#endif
|
||
|
IFUNC_IMPL_ADD (array, i, strlen, hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__strlen_power8)
|
||
|
- IFUNC_IMPL_ADD (array, i, strlen, hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ IFUNC_IMPL_ADD (array, i, strlen, hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strlen_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strlen, 1,
|
||
|
__strlen_ppc))
|
||
|
@@ -152,7 +152,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
#endif
|
||
|
IFUNC_IMPL_ADD (array, i, strncmp, hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__strncmp_power8)
|
||
|
- IFUNC_IMPL_ADD (array, i, strncmp, hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ IFUNC_IMPL_ADD (array, i, strncmp, hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strncmp_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strncmp, hwcap & PPC_FEATURE_POWER4,
|
||
|
__strncmp_power4)
|
||
|
@@ -165,7 +165,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__strchr_power8)
|
||
|
IFUNC_IMPL_ADD (array, i, strchr,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strchr_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strchr, 1,
|
||
|
__strchr_ppc))
|
||
|
@@ -176,7 +176,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__strchrnul_power8)
|
||
|
IFUNC_IMPL_ADD (array, i, strchrnul,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strchrnul_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strchrnul, 1,
|
||
|
__strchrnul_ppc))
|
||
|
@@ -192,7 +192,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
#endif
|
||
|
IFUNC_IMPL_ADD (array, i, memcmp, hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__memcmp_power8)
|
||
|
- IFUNC_IMPL_ADD (array, i, memcmp, hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ IFUNC_IMPL_ADD (array, i, memcmp, hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__memcmp_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, memcmp, hwcap & PPC_FEATURE_POWER4,
|
||
|
__memcmp_power4)
|
||
|
@@ -244,7 +244,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__memchr_power8)
|
||
|
IFUNC_IMPL_ADD (array, i, memchr,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__memchr_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, memchr, 1,
|
||
|
__memchr_ppc))
|
||
|
@@ -255,7 +255,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__memrchr_power8)
|
||
|
IFUNC_IMPL_ADD (array, i, memrchr,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__memrchr_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, memrchr, 1,
|
||
|
__memrchr_ppc))
|
||
|
@@ -272,7 +272,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
__rawmemchr_power9)
|
||
|
#endif
|
||
|
IFUNC_IMPL_ADD (array, i, rawmemchr,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__rawmemchr_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, rawmemchr, 1,
|
||
|
__rawmemchr_ppc))
|
||
|
@@ -282,7 +282,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
IFUNC_IMPL_ADD (array, i, strnlen,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__strnlen_power8)
|
||
|
- IFUNC_IMPL_ADD (array, i, strnlen, hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ IFUNC_IMPL_ADD (array, i, strnlen, hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strnlen_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strnlen, 1,
|
||
|
__strnlen_ppc))
|
||
|
@@ -293,14 +293,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__strcasecmp_power8)
|
||
|
IFUNC_IMPL_ADD (array, i, strcasecmp,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strcasecmp_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strcasecmp, 1, __strcasecmp_ppc))
|
||
|
|
||
|
/* Support sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c. */
|
||
|
IFUNC_IMPL (i, name, strcasecmp_l,
|
||
|
IFUNC_IMPL_ADD (array, i, strcasecmp_l,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strcasecmp_l_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strcasecmp_l, 1,
|
||
|
__strcasecmp_l_ppc))
|
||
|
@@ -311,14 +311,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__strncasecmp_power8)
|
||
|
IFUNC_IMPL_ADD (array, i, strncasecmp,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strncasecmp_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strncasecmp, 1, __strncasecmp_ppc))
|
||
|
|
||
|
/* Support sysdeps/powerpc/powerpc64/multiarch/strncase_l.c. */
|
||
|
IFUNC_IMPL (i, name, strncasecmp_l,
|
||
|
IFUNC_IMPL_ADD (array, i, strncasecmp_l,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strncasecmp_l_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strncasecmp_l, 1,
|
||
|
__strncasecmp_l_ppc))
|
||
|
@@ -329,7 +329,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__strrchr_power8)
|
||
|
IFUNC_IMPL_ADD (array, i, strrchr,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strrchr_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strrchr, 1,
|
||
|
__strrchr_ppc))
|
||
|
@@ -357,7 +357,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__strncpy_power8)
|
||
|
IFUNC_IMPL_ADD (array, i, strncpy,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strncpy_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strncpy, 1,
|
||
|
__strncpy_ppc))
|
||
|
@@ -374,7 +374,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__stpncpy_power8)
|
||
|
IFUNC_IMPL_ADD (array, i, stpncpy,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__stpncpy_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, stpncpy, 1,
|
||
|
__stpncpy_ppc))
|
||
|
@@ -390,7 +390,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||
|
__strcmp_power8)
|
||
|
IFUNC_IMPL_ADD (array, i, strcmp,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strcmp_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strcmp, 1,
|
||
|
__strcmp_ppc))
|
||
|
@@ -425,7 +425,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||
|
/* Support sysdeps/powerpc/powerpc64/multiarch/strstr.c. */
|
||
|
IFUNC_IMPL (i, name, strstr,
|
||
|
IFUNC_IMPL_ADD (array, i, strstr,
|
||
|
- hwcap & PPC_FEATURE_HAS_VSX,
|
||
|
+ hwcap & PPC_FEATURE_ARCH_2_06,
|
||
|
__strstr_power7)
|
||
|
IFUNC_IMPL_ADD (array, i, strstr, 1,
|
||
|
__strstr_ppc))
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memchr.c b/sysdeps/powerpc/powerpc64/multiarch/memchr.c
|
||
|
index 0c718d4f15..c24186689e 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/memchr.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/memchr.c
|
||
|
@@ -30,7 +30,7 @@ extern __typeof (__memchr) __memchr_power8 attribute_hidden;
|
||
|
libc_ifunc (__memchr,
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __memchr_power8 :
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __memchr_power7
|
||
|
: __memchr_ppc);
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memcmp.c b/sysdeps/powerpc/powerpc64/multiarch/memcmp.c
|
||
|
index 4fd089aba7..99559bce26 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/memcmp.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/memcmp.c
|
||
|
@@ -40,7 +40,7 @@ libc_ifunc_redirected (__redirect_memcmp, memcmp,
|
||
|
#endif
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __memcmp_power8 :
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __memcmp_power7
|
||
|
: (hwcap & PPC_FEATURE_POWER4)
|
||
|
? __memcmp_power4
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memrchr.c b/sysdeps/powerpc/powerpc64/multiarch/memrchr.c
|
||
|
index e06d6468b8..16bb6f0042 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/memrchr.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/memrchr.c
|
||
|
@@ -30,7 +30,7 @@ extern __typeof (__memrchr) __memrchr_power8 attribute_hidden;
|
||
|
libc_ifunc (__memrchr,
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __memrchr_power8 :
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __memrchr_power7
|
||
|
: __memrchr_ppc);
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset.c b/sysdeps/powerpc/powerpc64/multiarch/memset.c
|
||
|
index 5994bf02e6..c1aa143f60 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/memset.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/memset.c
|
||
|
@@ -48,7 +48,7 @@ libc_ifunc (__libc_memset,
|
||
|
# endif
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __memset_power8 :
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __memset_power7 :
|
||
|
(hwcap & PPC_FEATURE_ARCH_2_05)
|
||
|
? __memset_power6 :
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c b/sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c
|
||
|
index c0ffea2b93..b5d2d3a635 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c
|
||
|
@@ -41,7 +41,7 @@ libc_ifunc_redirected (__redirect___rawmemchr, __rawmemchr,
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_3_00)
|
||
|
? __rawmemchr_power9 :
|
||
|
# endif
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __rawmemchr_power7
|
||
|
: __rawmemchr_ppc);
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpncpy.c b/sysdeps/powerpc/powerpc64/multiarch/stpncpy.c
|
||
|
index bebd377fd9..e7035761a7 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/stpncpy.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpncpy.c
|
||
|
@@ -40,7 +40,7 @@ libc_ifunc_redirected (__redirect___stpncpy, __stpncpy,
|
||
|
# endif
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __stpncpy_power8
|
||
|
- : (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __stpncpy_power7
|
||
|
: __stpncpy_ppc);
|
||
|
weak_alias (__stpncpy, stpncpy)
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c b/sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c
|
||
|
index dcd7774403..55ca6c85c4 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c
|
||
|
@@ -29,7 +29,7 @@ extern __typeof (__strcasecmp) __strcasecmp_power8 attribute_hidden;
|
||
|
libc_ifunc (__libc_strcasecmp,
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __strcasecmp_power8:
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strcasecmp_power7
|
||
|
: __strcasecmp_ppc);
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c b/sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c
|
||
|
index 96a70b8b11..1afee5d7fd 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c
|
||
|
@@ -32,7 +32,7 @@ extern __typeof (__strcasecmp_l) __strcasecmp_l_power7 attribute_hidden;
|
||
|
|
||
|
extern __typeof (__strcasecmp_l) __libc_strcasecmp_l;
|
||
|
libc_ifunc (__libc_strcasecmp_l,
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strcasecmp_l_power7
|
||
|
: __strcasecmp_l_ppc);
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strchr.c b/sysdeps/powerpc/powerpc64/multiarch/strchr.c
|
||
|
index ea9ac1134f..27c794c6b7 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strchr.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strchr.c
|
||
|
@@ -35,7 +35,7 @@ extern __typeof (strchr) __strchr_power8 attribute_hidden;
|
||
|
libc_ifunc_redirected (__redirect_strchr, strchr,
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __strchr_power8 :
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strchr_power7
|
||
|
: __strchr_ppc);
|
||
|
weak_alias (strchr, index)
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c b/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c
|
||
|
index 4688e7c3f0..4a07b4a242 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c
|
||
|
@@ -30,7 +30,7 @@ extern __typeof (__strchrnul) __strchrnul_power8 attribute_hidden;
|
||
|
libc_ifunc (__strchrnul,
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __strchrnul_power8 :
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strchrnul_power7
|
||
|
: __strchrnul_ppc);
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcmp.c b/sysdeps/powerpc/powerpc64/multiarch/strcmp.c
|
||
|
index 72f9a639bf..4b0b25fff6 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strcmp.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcmp.c
|
||
|
@@ -40,7 +40,7 @@ libc_ifunc_redirected (__redirect_strcmp, strcmp,
|
||
|
# endif
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __strcmp_power8
|
||
|
- : (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strcmp_power7
|
||
|
: __strcmp_ppc);
|
||
|
#endif
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strlen.c b/sysdeps/powerpc/powerpc64/multiarch/strlen.c
|
||
|
index 109c8a90bd..0cd1c6faff 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strlen.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strlen.c
|
||
|
@@ -42,7 +42,7 @@ libc_ifunc (__libc_strlen,
|
||
|
# endif
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __strlen_power8 :
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strlen_power7
|
||
|
: __strlen_ppc);
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncase.c b/sysdeps/powerpc/powerpc64/multiarch/strncase.c
|
||
|
index 2013a5d75a..644046bd74 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strncase.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncase.c
|
||
|
@@ -29,7 +29,7 @@ extern __typeof (__strncasecmp) __strncasecmp_power8 attribute_hidden;
|
||
|
libc_ifunc (__libc_strncasecmp,
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __strncasecmp_power8:
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strncasecmp_power7
|
||
|
: __strncasecmp_ppc);
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c b/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c
|
||
|
index cad6da302d..d2d761af72 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c
|
||
|
@@ -34,7 +34,7 @@ extern __typeof (__strncasecmp_l) __strncasecmp_l_power7 attribute_hidden;
|
||
|
ifunc symbol properly. */
|
||
|
extern __typeof (__strncasecmp_l) __libc_strncasecmp_l;
|
||
|
libc_ifunc (__libc_strncasecmp_l,
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strncasecmp_l_power7
|
||
|
: __strncasecmp_l_ppc);
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
|
||
|
index eef524ddfb..1f689e5c05 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
|
||
|
@@ -43,7 +43,7 @@ libc_ifunc_redirected (__redirect_strncmp, strncmp,
|
||
|
# endif
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __strncmp_power8
|
||
|
- : (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strncmp_power7
|
||
|
: (hwcap & PPC_FEATURE_POWER4)
|
||
|
? __strncmp_power4
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncpy.c b/sysdeps/powerpc/powerpc64/multiarch/strncpy.c
|
||
|
index 7da9def358..d4d3463bd1 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strncpy.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncpy.c
|
||
|
@@ -43,7 +43,7 @@ libc_ifunc_redirected (__redirect_strncpy, strncpy,
|
||
|
# endif
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __strncpy_power8
|
||
|
- : (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strncpy_power7
|
||
|
: __strncpy_ppc);
|
||
|
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strnlen.c b/sysdeps/powerpc/powerpc64/multiarch/strnlen.c
|
||
|
index 264b7a752d..baf375a75a 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strnlen.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strnlen.c
|
||
|
@@ -31,7 +31,7 @@ extern __typeof (__strnlen) __strnlen_power8 attribute_hidden;
|
||
|
libc_ifunc_redirected (__redirect___strnlen, __strnlen,
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __strnlen_power8 :
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strnlen_power7
|
||
|
: __strnlen_ppc);
|
||
|
weak_alias (__strnlen, strnlen)
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strrchr.c b/sysdeps/powerpc/powerpc64/multiarch/strrchr.c
|
||
|
index bb06b93d19..1c9eea1817 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strrchr.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strrchr.c
|
||
|
@@ -33,7 +33,7 @@ extern __typeof (strrchr) __strrchr_power8 attribute_hidden;
|
||
|
libc_ifunc_redirected (__redirect_strrchr, strrchr,
|
||
|
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
|
||
|
? __strrchr_power8 :
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strrchr_power7
|
||
|
: __strrchr_ppc);
|
||
|
weak_alias (strrchr, rindex)
|
||
|
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strstr.c b/sysdeps/powerpc/powerpc64/multiarch/strstr.c
|
||
|
index bb0588844e..6582798dda 100644
|
||
|
--- a/sysdeps/powerpc/powerpc64/multiarch/strstr.c
|
||
|
+++ b/sysdeps/powerpc/powerpc64/multiarch/strstr.c
|
||
|
@@ -30,7 +30,7 @@ extern __typeof (strstr) __strstr_power7 attribute_hidden;
|
||
|
/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
|
||
|
ifunc symbol properly. */
|
||
|
libc_ifunc_redirected (__redirect_strstr, strstr,
|
||
|
- (hwcap & PPC_FEATURE_HAS_VSX)
|
||
|
+ (hwcap & PPC_FEATURE_ARCH_2_06)
|
||
|
? __strstr_power7
|
||
|
: __strstr_ppc);
|
||
|
#endif
|