From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 557913858016; Mon, 4 Apr 2022 13:00:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 557913858016 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] math: Handle fabsf128 for clang X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 6c5f586e5811d8b8d55c993ddee8c375e32ee924 X-Git-Newrev: 6bc8d648dc576efde51e34e1190f63e61b1a2885 Message-Id: <20220404130018.557913858016@sourceware.org> Date: Mon, 4 Apr 2022 13:00:18 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2022 13:00:18 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6bc8d648dc576efde51e34e1190f63e61b1a2885 commit 6bc8d648dc576efde51e34e1190f63e61b1a2885 Author: Adhemerval Zanella 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