about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc64/multiarch/stpcpy.c')
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/stpcpy.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c
index d4eb4285fc..5be413405e 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c
@@ -32,12 +32,15 @@ extern __typeof (__stpcpy) __stpcpy_power9 attribute_hidden;
 
 libc_ifunc_hidden (__stpcpy, __stpcpy,
 # ifdef __LITTLE_ENDIAN__
-		   (hwcap2 & PPC_FEATURE2_ARCH_3_00)
+		   (hwcap2 & PPC_FEATURE2_ARCH_3_00
+		    && hwcap & PPC_FEATURE_HAS_VSX)
 		   ? __stpcpy_power9 :
 # endif
-		     (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+		     (hwcap2 & PPC_FEATURE2_ARCH_2_07
+		      && hwcap & PPC_FEATURE_HAS_ALTIVEC)
 		     ? __stpcpy_power8
-		     : (hwcap & PPC_FEATURE_HAS_VSX)
+		     : (hwcap & PPC_FEATURE_ARCH_2_06
+		        && hwcap & PPC_FEATURE_HAS_VSX)
 		       ? __stpcpy_power7
 		       : __stpcpy_ppc);