diff options
author | Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> | 2019-05-28 14:53:39 -0300 |
---|---|---|
committer | Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> | 2020-02-19 17:29:00 -0300 |
commit | 287ae18fbad9e62e533eb572e38589142449eb09 (patch) | |
tree | 534e703de1cdba54454d4733c2f090332626de3e | |
parent | 0704d322185cac23a98334f1f5918dee8069d2fe (diff) | |
download | glibc-287ae18fbad9e62e533eb572e38589142449eb09.zip glibc-287ae18fbad9e62e533eb572e38589142449eb09.tar.gz glibc-287ae18fbad9e62e533eb572e38589142449eb09.tar.bz2 |
powerpc64: Fix libmvec's logf4 build on GCC < 8
The built-in vec_float was added to GCC 8.0, requiring an alternative
implementation when using older GCC versions.
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c index 80e5077..6fb4a5d 100644 --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c @@ -32,6 +32,17 @@ LOGF_POLY_ORDER = 4. */ #define N (1 << LOGF_TABLE_BITS) #define OFF 0x3f330000 +/* The vec_float built-in was added to GCC 8. */ +#if !__GNUC_PREREQ (8, 0) +vector float +vec_float (vector signed int xb) +{ + vector float tmp; + __asm__ volatile ("xvcvsxwsp %x0,%x1" : "=wa" (tmp) : "wa" (xb)); + return tmp; +} +#endif + vector float _ZGVbN4v_logf (vector float x) { |