Message ID | 20180606223909.16675-6-tuliom@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | Introduce ieee128 symbols and redirections | expand |
On Wed, 6 Jun 2018, Tulio Magno Quites Machado Filho wrote: > These functions do not exist in the float128 api, but they need to be > provided for long double (*l api) because they are part of ISO C. They're not part of ISO C; they are part of *the long double API provided by glibc* (and thus need to be provided for any alternative long double format just like any other semi-obsolescent but still-available long double interface, e.g. qecvt). Is it possible to provide these particular functions in the API without adding extra ABIs for them? For example, if the relevant case in math.h had #defines of __dremieee128 or __ieee128_dreml or whatever it ends up being to the corresponding name for remainder, and likewise for gamma / lgamma, would that work correctly with __REDIRECT to get calls to dreml and gammal working for -mabi=ieeelongdouble without needing to add two new ABIs and two new source files?
Joseph Myers <joseph@codesourcery.com> writes: > On Wed, 6 Jun 2018, Tulio Magno Quites Machado Filho wrote: > >> These functions do not exist in the float128 api, but they need to be >> provided for long double (*l api) because they are part of ISO C. > > They're not part of ISO C; they are part of *the long double API provided > by glibc* (and thus need to be provided for any alternative long double > format just like any other semi-obsolescent but still-available long > double interface, e.g. qecvt). Indeed. > Is it possible to provide these particular functions in the API without > adding extra ABIs for them? For example, if the relevant case in math.h > had #defines of __dremieee128 or __ieee128_dreml or whatever it ends up > being to the corresponding name for remainder, and likewise for gamma / > lgamma, would that work correctly with __REDIRECT to get calls to dreml > and gammal working for -mabi=ieeelongdouble without needing to add two new > ABIs and two new source files? Yes, it is. I'm dropping this patch.
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Versions b/sysdeps/ieee754/ldbl-128ibm-compat/Versions index 06c19569c5..b7efe84918 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/Versions +++ b/sysdeps/ieee754/ldbl-128ibm-compat/Versions @@ -41,6 +41,7 @@ libm { __csqrtieee128; __ctanhieee128; __ctanieee128; + __dremieee128; __erfcieee128; __erfieee128; __exp10ieee128; @@ -71,6 +72,7 @@ libm { __frexpieee128; __fromfpieee128; __fromfpxieee128; + __gammaieee128; __gamma_productieee128; __getpayloadieee128; __hypotieee128; diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/w_lgammaf128.c b/sysdeps/ieee754/ldbl-128ibm-compat/w_lgammaf128.c new file mode 100644 index 0000000000..2b213783da --- /dev/null +++ b/sysdeps/ieee754/ldbl-128ibm-compat/w_lgammaf128.c @@ -0,0 +1,22 @@ +/* Deprecated gammal functions. + Copyright (C) 2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <math-type-macros-float128.h> +#include <w_lgamma_template.c> + +libm_alias_float128_other_r_ldbl(__lgamma, gamma,) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/w_remainderf128.c b/sysdeps/ieee754/ldbl-128ibm-compat/w_remainderf128.c new file mode 100644 index 0000000000..218b8d8a75 --- /dev/null +++ b/sysdeps/ieee754/ldbl-128ibm-compat/w_remainderf128.c @@ -0,0 +1,22 @@ +/* Deprecated dreml functions. + Copyright (C) 2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <math-type-macros-float128.h> +#include <w_remainder_template.c> + +libm_alias_float128_other_r_ldbl (__remainder, drem, );