diff options
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/bzero.c | 21 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/memset.c | 22 |
2 files changed, 25 insertions, 18 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/bzero.c b/sysdeps/powerpc/powerpc64/multiarch/bzero.c index c3f819f..305b015 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/bzero.c +++ b/sysdeps/powerpc/powerpc64/multiarch/bzero.c @@ -29,15 +29,18 @@ extern __typeof (bzero) __bzero_power7 attribute_hidden; extern __typeof (bzero) __bzero_power8 attribute_hidden; libc_ifunc (__bzero, - (hwcap2 & PPC_FEATURE2_ARCH_2_07) - ? __bzero_power8 : - (hwcap & PPC_FEATURE_HAS_VSX) - ? __bzero_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __bzero_power6 : - (hwcap & PPC_FEATURE_POWER4) - ? __bzero_power4 - : __bzero_ppc); + (hwcap2 & PPC_FEATURE2_ARCH_2_07 + && __GLRO(dl_cache_line_size) == 0x80) + ? __bzero_power8 : + (hwcap & PPC_FEATURE_HAS_VSX + && __GLRO(dl_cache_line_size) == 0x80) + ? __bzero_power7 : + (hwcap & PPC_FEATURE_ARCH_2_05 + && __GLRO(dl_cache_line_size) == 0x80) + ? __bzero_power6 : + (hwcap & PPC_FEATURE_POWER4 && __GLRO(dl_cache_line_size) == 0x80) + ? __bzero_power4 + : __bzero_ppc); weak_alias (__bzero, bzero) #endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset.c b/sysdeps/powerpc/powerpc64/multiarch/memset.c index d483f66..dbc737b 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/memset.c +++ b/sysdeps/powerpc/powerpc64/multiarch/memset.c @@ -37,15 +37,19 @@ extern __typeof (__redirect_memset) __memset_power8 attribute_hidden; /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ libc_ifunc (__libc_memset, - (hwcap2 & PPC_FEATURE2_ARCH_2_07) - ? __memset_power8 : - (hwcap & PPC_FEATURE_HAS_VSX) - ? __memset_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __memset_power6 : - (hwcap & PPC_FEATURE_POWER4) - ? __memset_power4 - : __memset_ppc); + (hwcap2 & PPC_FEATURE2_ARCH_2_07 + && __GLRO(dl_cache_line_size) == 0x80) + ? __memset_power8 : + (hwcap & PPC_FEATURE_HAS_VSX + && __GLRO(dl_cache_line_size) == 0x80) + ? __memset_power7 : + (hwcap & PPC_FEATURE_ARCH_2_05 + && __GLRO(dl_cache_line_size) == 0x80) + ? __memset_power6 : + (hwcap & PPC_FEATURE_POWER4 + && __GLRO(dl_cache_line_size) == 0x80) + ? __memset_power4 + : __memset_ppc); #undef memset strong_alias (__libc_memset, memset); |