mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-24 03:31:07 +00:00
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>
This commit is contained in:
parent
c87fcacc50
commit
e4ca6de1bc
@ -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))
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 :
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user