public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] math: Handle fabsf128 for clang
@ 2022-04-04 13:00 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2022-04-04 13:00 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6bc8d648dc576efde51e34e1190f63e61b1a2885

commit 6bc8d648dc576efde51e34e1190f63e61b1a2885
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 11:04:53 2022 -0300

    math: Handle fabsf128 for clang

Diff:
---
 include/math.h                              | 4 +++-
 sysdeps/generic/math-type-macros.h          | 2 +-
 sysdeps/ieee754/float128/float128_private.h | 2 +-
 sysdeps/x86/math-use-builtins-fabs.h        | 6 +++++-
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/include/math.h b/include/math.h
index fa11a710a6..6a9d1a678c 100644
--- a/include/math.h
+++ b/include/math.h
@@ -123,11 +123,13 @@ __isinff128 (_Float128 x)
 }
 #  endif
 
+#  ifdef __USE_EXTERN_INLINES
 extern inline _Float128
-fabsf128 (_Float128 x)
+__fabsf128 (_Float128 x)
 {
   return __builtin_fabsf128 (x);
 }
+#  endif
 # endif
 
 # if !(defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0)
diff --git a/sysdeps/generic/math-type-macros.h b/sysdeps/generic/math-type-macros.h
index df5852524d..98cbb68118 100644
--- a/sysdeps/generic/math-type-macros.h
+++ b/sysdeps/generic/math-type-macros.h
@@ -109,7 +109,7 @@
 
 /* Helper macros for commonly used functions.  */
 #define M_COPYSIGN M_SUF (copysign)
-#define M_FABS M_SUF (fabs)
+#define M_FABS M_SUF (__fabs)
 #define M_SINCOS M_SUF (__sincos)
 #define M_SCALBN M_SUF (__scalbn)
 #define M_LOG1P M_SUF (__log1p)
diff --git a/sysdeps/ieee754/float128/float128_private.h b/sysdeps/ieee754/float128/float128_private.h
index f9655df0df..a74462575c 100644
--- a/sysdeps/ieee754/float128/float128_private.h
+++ b/sysdeps/ieee754/float128/float128_private.h
@@ -336,7 +336,7 @@
 #define erfl erff128
 #define expl expf128
 #define expm1l expm1f128
-#define fabsl fabsf128
+#define fabsl __fabsf128
 #define fdiml fdimf128
 #define finitel finitef128_do_not_use
 #define floorl floorf128
diff --git a/sysdeps/x86/math-use-builtins-fabs.h b/sysdeps/x86/math-use-builtins-fabs.h
index facf3a6425..94a7319a01 100644
--- a/sysdeps/x86/math-use-builtins-fabs.h
+++ b/sysdeps/x86/math-use-builtins-fabs.h
@@ -1,4 +1,8 @@
 /* Generic implementation already assume builtin support for
    float and double.  */
 #define USE_FABSL_BUILTIN 1
-#define USE_FABSF128_BUILTIN 1
+#ifdef __clang__
+# define USE_FABSF128_BUILTIN 0
+#else
+# define USE_FABSF128_BUILTIN 1
+#endif


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-04 13:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 13:00 [glibc/azanella/clang] math: Handle fabsf128 for clang Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).