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 /sysdeps/ieee754/ldbl-128ibm | |
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 'sysdeps/ieee754/ldbl-128ibm')
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h b/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h index 6eaf8add26..70da85f2cb 100644 --- a/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h +++ b/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h @@ -23,8 +23,12 @@ #ifdef __NO_LONG_DOUBLE_MATH # define iscanonical(x) ((void) (__typeof (x)) (x), 1) #else +# if __LONG_DOUBLE_USES_FLOAT128 == 1 +# define __iscanonicall(x) ((void) (__typeof (x)) (x), 1) +# else extern int __iscanonicall (long double __x) __THROW __attribute__ ((__const__)); +# endif # define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1) # define __iscanonical(x) ((void) (__typeof (x)) (x), 1) # if __HAVE_DISTINCT_FLOAT128 @@ -50,7 +54,9 @@ extern "C++" { inline int iscanonical (float __val) { return __iscanonicalf (__val); } inline int iscanonical (double __val) { return __iscanonical (__val); } inline int iscanonical (long double __val) { return __iscanonicall (__val); } -# if __HAVE_DISTINCT_FLOAT128 +/* When using an IEEE 128-bit long double, _Float128 is defined as long double + in C++. */ +# if __HAVE_DISTINCT_FLOAT128 && __HAVE_FLOAT128_UNLIKE_LDBL inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); } # endif } |