This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 1/9] ldbl-128ibm-compat: Create libm-alias-float128.h
- From: Tulio Magno Quites Machado Filho <tuliom at linux dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Cc: joseph at codesourcery dot com, gabriel at inconstante dot eti dot br, raji at linux dot ibm dot com
- Date: Wed, 6 Jun 2018 19:39:01 -0300
- Subject: [PATCH 1/9] ldbl-128ibm-compat: Create libm-alias-float128.h
- References: <20180606223909.16675-1-tuliom@linux.ibm.com>
Add a new libm-alias-float128.h in order to provide the __*ieee128
aliases for the existing *f128 that do not have a globally exported
symbol.
2018-06-06 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
* sysdeps/ieee754/ldbl-128ibm-compat/Versions: New file.
* sysdeps/ieee754/ldbl-128ibm-compat/libm-alias-float128.h: New file.
---
sysdeps/ieee754/ldbl-128ibm-compat/Versions | 129 +++++++++++++++++++++
.../ldbl-128ibm-compat/libm-alias-float128.h | 64 ++++++++++
2 files changed, 193 insertions(+)
create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/Versions
create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/libm-alias-float128.h
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Versions b/sysdeps/ieee754/ldbl-128ibm-compat/Versions
new file mode 100644
index 0000000000..af6b4b3f60
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/Versions
@@ -0,0 +1,129 @@
+%include <ldbl-128ibm-compat-abi.h>
+%ifndef LDBL_IBM128_VERSION
+% error "ldbl-128ibm-compat-abi.h must define LDBL_IBM128_VERSION"
+%endif
+
+libm {
+ LDBL_IBM128_VERSION {
+ __acoshieee128;
+ __acosieee128;
+ __asinhieee128;
+ __asinieee128;
+ __atan2ieee128;
+ __atanhieee128;
+ __atanieee128;
+ __cabsieee128;
+ __cacoshieee128;
+ __cacosieee128;
+ __canonicalizeieee128;
+ __cargieee128;
+ __casinhieee128;
+ __casinieee128;
+ __catanhieee128;
+ __catanieee128;
+ __cbrtieee128;
+ __ccoshieee128;
+ __ccosieee128;
+ __ceilieee128;
+ __cexpieee128;
+ __cimagieee128;
+ __clog10ieee128;
+ __clogieee128;
+ __conjieee128;
+ __copysignieee128;
+ __coshieee128;
+ __cosieee128;
+ __cpowieee128;
+ __cprojieee128;
+ __crealieee128;
+ __csinhieee128;
+ __csinieee128;
+ __csqrtieee128;
+ __ctanhieee128;
+ __ctanieee128;
+ __erfcieee128;
+ __erfieee128;
+ __exp10ieee128;
+ __exp2ieee128;
+ __expieee128;
+ __expm1ieee128;
+ __f32addieee128;
+ __f32divieee128;
+ __f32mulieee128;
+ __f32subieee128;
+ __f64addieee128;
+ __f64divieee128;
+ __f64mulieee128;
+ __f64subieee128;
+ __f64xaddieee128;
+ __f64xdivieee128;
+ __f64xmulieee128;
+ __f64xsubieee128;
+ __fabsieee128;
+ __fdimieee128;
+ __floorieee128;
+ __fmaieee128;
+ __fmaxieee128;
+ __fmaxmagieee128;
+ __fminieee128;
+ __fminmagieee128;
+ __fmodieee128;
+ __frexpieee128;
+ __fromfpieee128;
+ __fromfpxieee128;
+ __gamma_productieee128;
+ __getpayloadieee128;
+ __hypotieee128;
+ __ilogbieee128;
+ __j0ieee128;
+ __j1ieee128;
+ __jnieee128;
+ __ldexpieee128;
+ __lgammaieee128;
+ __lgammaieee128_r;
+ __lgamma_negieee128;
+ __lgamma_productieee128;
+ __llogbieee128;
+ __llrintieee128;
+ __llroundieee128;
+ __log10ieee128;
+ __log1pieee128;
+ __log2ieee128;
+ __logbieee128;
+ __logieee128;
+ __lrintieee128;
+ __lroundieee128;
+ __modfieee128;
+ __nanieee128;
+ __nearbyintieee128;
+ __nextafterieee128;
+ __nextdownieee128;
+ __nextupieee128;
+ __powieee128;
+ __remainderieee128;
+ __remquoieee128;
+ __rintieee128;
+ __roundevenieee128;
+ __roundieee128;
+ __scalblnieee128;
+ __scalbnieee128;
+ __setpayloadieee128;
+ __setpayloadsigieee128;
+ __sincosieee128;
+ __sinhieee128;
+ __sinieee128;
+ __sqrtieee128;
+ __tanhieee128;
+ __tanieee128;
+ __tgammaieee128;
+ __totalorderieee128;
+ __totalordermagieee128;
+ __truncieee128;
+ __ufromfpieee128;
+ __ufromfpxieee128;
+ __x2y2m1ieee128;
+ __y0ieee128;
+ __y1ieee128;
+ __ynieee128;
+ }
+}
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/libm-alias-float128.h b/sysdeps/ieee754/ldbl-128ibm-compat/libm-alias-float128.h
new file mode 100644
index 0000000000..a21dfcaea5
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/libm-alias-float128.h
@@ -0,0 +1,64 @@
+/* Define aliases for libm _Float128 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/>. */
+
+#ifndef _LIBM_ALIAS_FLOAT128_H
+#define _LIBM_ALIAS_FLOAT128_H
+
+#include <bits/floatn.h>
+#include <ldbl-128ibm-compat-abi.h>
+
+/* This macro should be used on all long double functions that are not part of
+ the _Float128 API in order to provide *ieee128 symbols without exposing
+ internal *f128 symbols. */
+#define libm_alias_float128_other_r_ldbl(from, to, r) \
+ strong_alias (from ## f128 ## r, __ ## to ## ieee128 ## r)
+
+/* Define _FloatN / _FloatNx aliases (other than that for _Float128)
+ for a _Float128 libm function that has internal name FROM ## f128
+ ## R and public names TO ## suffix ## R for each suffix of a
+ supported _FloatN / _FloatNx floating-point type with the same
+ format as _Float128. */
+#if __HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE
+# define libm_alias_float128_other_r(from, to, r) \
+ weak_alias (from ## f128 ## r, to ## f64x ## r); \
+ libm_alias_float128_other_r_ldbl(from, to, r)
+#else
+# define libm_alias_float128_other_r(from, to, r) \
+ libm_alias_float128_other_r_ldbl(from, to, r)
+#endif
+
+/* Likewise, but without the R suffix. */
+#define libm_alias_float128_other(from, to) \
+ libm_alias_float128_other_r (from, to, )
+
+/* Define aliases for a _Float128 libm function that has internal name
+ FROM ## f128 ## R and public names TO ## suffix ## R for each
+ suffix of a supported floating-point type with the same format as
+ _Float128. This should only be used for functions where such
+ public names exist for _FloatN types, not for
+ implementation-namespace exported names (where there is one name
+ per format, not per type) or for obsolescent functions not provided
+ for _FloatN types. */
+#define libm_alias_float128_r(from, to, r) \
+ weak_alias (from ## f128 ## r, to ## f128 ## r); \
+ libm_alias_float128_other_r (from, to, r)
+
+/* Likewise, but without the R suffix. */
+#define libm_alias_float128(from, to) libm_alias_float128_r (from, to, )
+
+#endif
--
2.14.4