about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/multiarch/strnlen.c
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2020-10-02 10:18:48 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2021-02-17 13:38:29 -0300
commit569f620ecdc051d55d08a53494258a95cd345d91 (patch)
treed75f0a2756a90fcfe7da0f2badacda35b93613c6 /sysdeps/powerpc/powerpc64/multiarch/strnlen.c
parentb50bbee77534c25c341c38702866b2cdf35f3494 (diff)
downloadglibc-tuliom/microwatt.tar.gz
glibc-tuliom/microwatt.tar.xz
glibc-tuliom/microwatt.zip
powerpc64: Stop assuming new processors have VSX tuliom/microwatt
VSX has been available on IBM POWER since POWER7.  All IBM processors
compliant with POWER ISAs 2.07, 3.0 and 3.1 also support VSX.
This patch aims to remove a barrier for new processors as they start to
support Linux on powerpc64 while not having support for all the altivec
and vsx instructions.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/multiarch/strnlen.c')
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/strnlen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strnlen.c b/sysdeps/powerpc/powerpc64/multiarch/strnlen.c
index 264b7a752d..0536bbe50f 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strnlen.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strnlen.c
@@ -29,7 +29,8 @@ extern __typeof (__strnlen) __strnlen_power8 attribute_hidden;
 # undef strnlen
 # undef __strnlen
 libc_ifunc_redirected (__redirect___strnlen, __strnlen,
-		       (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+		       (hwcap2 & PPC_FEATURE2_ARCH_2_07
+			&& hwcap & PPC_FEATURE_HAS_VSX)
 		       ? __strnlen_power8 :
 			 (hwcap & PPC_FEATURE_HAS_VSX)
 			 ? __strnlen_power7