about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2019-04-15 16:17:52 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2020-02-19 17:27:54 -0300
commitfcadb6eab301c217c862b6f0c9d83366a97d0719 (patch)
tree2ee6ca03332c6367d29dfb51ab4d9bd523061553
parenta4333ff6a082bcb10880b98ed72b1eeabff4f164 (diff)
downloadglibc-fcadb6eab301c217c862b6f0c9d83366a97d0719.tar.gz
glibc-fcadb6eab301c217c862b6f0c9d83366a97d0719.tar.xz
glibc-fcadb6eab301c217c862b6f0c9d83366a97d0719.zip
powerpc64: Fix mathvec build and tests on POWER < 8
vec_d_cos2_vsx.c, vec_d_sin2_vsx.c and vec_d_sincos2_vsx.c use
vec_sl(), which is only available on POWER8 processors.
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/math-tests-arch.h2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile6
2 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/powerpc/powerpc64/fpu/math-tests-arch.h b/sysdeps/powerpc/powerpc64/fpu/math-tests-arch.h
index 74fac298d2..bc3c1498bd 100644
--- a/sysdeps/powerpc/powerpc64/fpu/math-tests-arch.h
+++ b/sysdeps/powerpc/powerpc64/fpu/math-tests-arch.h
@@ -25,7 +25,7 @@
   do                                                           \
     {                                                          \
       INIT_ARCH()                                              \
-      if (!(hwcap & PPC_FEATURE_HAS_VSX )) return;             \
+      if (!(hwcap2 & PPC_FEATURE2_ARCH_2_07)) return;          \
     }                                                          \
   while (0)
 
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
index dd2b128cd5..b1406cc337 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
@@ -2,11 +2,11 @@ ifeq ($(subdir),mathvec)
 libmvec-sysdep_routines += vec_d_cos2_vsx vec_s_cosf4_vsx \
 			   vec_d_sin2_vsx vec_s_sinf4_vsx \
 			   vec_d_sincos2_vsx vec_s_sincosf4_vsx
-CFLAGS-vec_d_cos2_vsx.c += -mabi=altivec -maltivec -mvsx
+CFLAGS-vec_d_cos2_vsx.c += -mabi=altivec -maltivec -mvsx -mpower8-vector
 CFLAGS-vec_s_cosf4_vsx.c += -mabi=altivec -maltivec -mvsx
-CFLAGS-vec_d_sin2_vsx.c += -mabi=altivec -maltivec -mvsx
+CFLAGS-vec_d_sin2_vsx.c += -mabi=altivec -maltivec -mvsx -mpower8-vector
 CFLAGS-vec_s_sinf4_vsx.c += -mabi=altivec -maltivec -mvsx
-CFLAGS-vec_d_sincos2_vsx.c += -mabi=altivec -maltivec -mvsx
+CFLAGS-vec_d_sincos2_vsx.c += -mabi=altivec -maltivec -mvsx -mpower8-vector
 CFLAGS-vec_s_sincosf4_vsx.c += -mabi=altivec -maltivec -mvsx
 endif