diff options
author | Anton Blanchard <anton@ozlabs.org> | 2021-07-27 15:47:51 +1000 |
---|---|---|
committer | Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> | 2021-08-06 16:10:08 -0300 |
commit | 60b4dd25790342b40e8942e3a4115f511a6b6911 (patch) | |
tree | 3e2684b2432e8fe0ff9f65fa66cb238112309a0b /sysdeps/powerpc/powerpc64/multiarch/memcmp.c | |
parent | f2a15dd668913c5a1388ba7e1131b25162b2ea75 (diff) | |
download | glibc-60b4dd25790342b40e8942e3a4115f511a6b6911.zip glibc-60b4dd25790342b40e8942e3a4115f511a6b6911.tar.gz glibc-60b4dd25790342b40e8942e3a4115f511a6b6911.tar.bz2 |
powerpc64: Add checks for Altivec and VSX in ifunc selection
We'd like to support processors without Altivec or VSX, so check
the relevant hwcap bits before selecting them.
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Diffstat (limited to 'sysdeps/powerpc/powerpc64/multiarch/memcmp.c')
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/memcmp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memcmp.c b/sysdeps/powerpc/powerpc64/multiarch/memcmp.c index 99559bc..89b56c1 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/memcmp.c +++ b/sysdeps/powerpc/powerpc64/multiarch/memcmp.c @@ -38,7 +38,8 @@ libc_ifunc_redirected (__redirect_memcmp, memcmp, && hwcap & PPC_FEATURE_HAS_VSX) ? __memcmp_power10 : #endif - (hwcap2 & PPC_FEATURE2_ARCH_2_07) + (hwcap2 & PPC_FEATURE2_ARCH_2_07 + && hwcap & PPC_FEATURE_HAS_ALTIVEC) ? __memcmp_power8 : (hwcap & PPC_FEATURE_ARCH_2_06) ? __memcmp_power7 |