public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] math: Handle fabsf128 for clang Date: Mon, 4 Apr 2022 13:00:18 +0000 (GMT) [thread overview] Message-ID: <20220404130018.557913858016@sourceware.org> (raw) 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
reply other threads:[~2022-04-04 13:00 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220404130018.557913858016@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).