]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
powerpc64: Add support for vec_cmpne for older compilers
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Wed, 3 Jul 2019 19:17:27 +0000 (16:17 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Wed, 19 Feb 2020 20:29:21 +0000 (17:29 -0300)
vec_cmpne was added to GCC 7, requiring an alternative implementation
when building glibc with GCC 6.

sysdeps/powerpc/powerpc64/fpu/multiarch/math_config_dbl.h
sysdeps/powerpc/powerpc64/fpu/multiarch/math_config_flt.h

index 7c94f5b9b23fa067cf54647f42cd47205fe017ba..e1ef3a28745326206a8b1e4568dfc5ce4916f644 100644 (file)
 # define TOINT_INTRINSICS 0
 #endif
 
+/* vec_cmpne was included in GCC 7.
+   TODO: Remove this when the minimum required GCC version is >= 7.  */
+#ifndef vec_cmpne
+static inline vector bool long long
+vec_cmpne (vector unsigned long long a, vector unsigned long long b)
+{
+  vector bool long long tmp = vec_cmpeq (a, b);
+  return vec_nor (tmp, tmp);
+}
+#endif
+
 #if TOINT_INTRINSICS
 /* Round x to nearest int in all rounding modes, ties have to be rounded
    consistently with converttoint so the results match.  If the result
index 18f34197e2ef2f9adb3c89fa6df84c8ae9db7d56..34345d5cb2c550717b9a408a8be8f5c1e601a60f 100644 (file)
 # define TOINT_INTRINSICS 0
 #endif
 
+/* vec_cmpne was included in GCC 7.
+   TODO: Remove this when the minimum required GCC version is >= 7.  */
+#ifndef vec_cmpne
+static inline vector bool int
+vec_cmpne (vector unsigned a, vector unsigned b)
+{
+  vector bool int tmp = vec_cmpeq (a, b);
+  return vec_nor (tmp, tmp);
+}
+#endif
+
 #if TOINT_INTRINSICS
 /* Round x to nearest int in all rounding modes, ties have to be rounded
    consistently with converttoint so the results match.  If the result