From 8dbfea3a2094798a52cebddde01d255483f49665 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 19 Jun 2018 21:41:16 -0300 Subject: ldbl-128ibm-compat: Redirect long double functions to f128/ieee128 functions Modify the headers to redirect long double functions to global __*f128 symbols or to __*ieee128 otherwise. Most of the functions in math.h benefit from the infrastructure already available for __LDBL_COMPAT. The only exceptions are nexttowardf and nexttoward that need especial treatment. Both math/bits/mathcalls-helper-functions.h and math/bits/mathcalls.h were modified in order to provide alternative redirection destinations that are essential to support functions that should not be redirected to the same name pattern of the rest of the functions, i.e.: __fpclassify, __signbit, __iseqsig, __issignaling, isinf, finite and isnan, which will be redirected to __*f128 instead of __*ieee128 used for the rest. --- include/math.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/math.h b/include/math.h index a274f2bdfd..1b3199b3f6 100644 --- a/include/math.h +++ b/include/math.h @@ -18,7 +18,8 @@ hidden_proto (__finitef) hidden_proto (__isinff) hidden_proto (__isnanf) -# ifndef __NO_LONG_DOUBLE_MATH +# if !defined __NO_LONG_DOUBLE_MATH \ + && __LONG_DOUBLE_USES_FLOAT128 == 0 hidden_proto (__finitel) hidden_proto (__isinfl) hidden_proto (__isnanl) @@ -40,7 +41,8 @@ libm_hidden_proto (__exp) libm_hidden_proto (__expf) libm_hidden_proto (__roundeven) -# ifndef __NO_LONG_DOUBLE_MATH +# if !defined __NO_LONG_DOUBLE_MATH \ + && __LONG_DOUBLE_USES_FLOAT128 == 0 libm_hidden_proto (__fpclassifyl) libm_hidden_proto (__issignalingl) libm_hidden_proto (__expl) @@ -140,7 +142,8 @@ fabsf128 (_Float128 x) double (FUNC) (ARGS (double)) asm (PREFIX #FUNC ); \ MATH_REDIRECT_LDBL (FUNC, PREFIX, ARGS) \ MATH_REDIRECT_F128 (FUNC, PREFIX, ARGS) -# ifdef __NO_LONG_DOUBLE_MATH +# if defined __NO_LONG_DOUBLE_MATH \ + || __LONG_DOUBLE_USES_FLOAT128 == 1 # define MATH_REDIRECT_LDBL(FUNC, PREFIX, ARGS) # else # define MATH_REDIRECT_LDBL(FUNC, PREFIX, ARGS) \ -- cgit v1.2.3-65-gdbad