diff options
author | Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> | 2018-06-19 21:41:16 -0300 |
---|---|---|
committer | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2020-02-28 08:20:02 -0600 |
commit | 8dbfea3a2094798a52cebddde01d255483f49665 (patch) | |
tree | d8b74d5f7e0e474b46f28b77cf244be5ffcc2b0c /include/math.h | |
parent | 6437fecca30deb88e5901ab03168cb7b40c7e0a7 (diff) | |
download | glibc-8dbfea3a2094798a52cebddde01d255483f49665.tar.gz glibc-8dbfea3a2094798a52cebddde01d255483f49665.tar.xz glibc-8dbfea3a2094798a52cebddde01d255483f49665.zip |
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.
Diffstat (limited to 'include/math.h')
-rw-r--r-- | include/math.h | 9 |
1 files changed, 6 insertions, 3 deletions
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) \ |