public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v4 2/5] float128: Include math-finite.h for _Float128
  2017-05-11 20:53 [PATCH v4 0/5] Add float128 functions and declarations to libm Gabriel F. T. Gomes
  2017-05-11 20:53 ` [PATCH v4 1/5] float128: Add public _Float128 " Gabriel F. T. Gomes
@ 2017-05-11 20:53 ` Gabriel F. T. Gomes
  2017-05-12 14:56   ` Joseph Myers
  2017-05-11 20:53 ` [PATCH v4 3/5] float128: Add private _Float128 declarations for libm Gabriel F. T. Gomes
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: Gabriel F. T. Gomes @ 2017-05-11 20:53 UTC (permalink / raw)
  To: libc-alpha

Changes since v3:

  - Replace __MATH_DECLARING_FLOAT128 with __MATH_DECLARING_FLOATN.

-- 8< --
All the declarations in math-finite.h are macroized by floating-point
type.  This patch includes it for float128 and protects the
declarations of functions that need not be declared for float128.

2017-05-09  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>

	* math/math.h: Include bits/math-finite.h for float128.
	(__MATH_DECLARING_FLOATN): Define to control declaration of
	float128 functions.
	* math/bits/math-finite.h (pow10): Do not declare for float128.
	(gamma): Likewise.
	(scalb): Likewise.
---
 math/bits/math-finite.h | 13 ++++++++-----
 math/math.h             | 21 +++++++++++++++++++++
 2 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/math/bits/math-finite.h b/math/bits/math-finite.h
index 29f2f2e..b07ce31 100644
--- a/math/bits/math-finite.h
+++ b/math/bits/math-finite.h
@@ -83,7 +83,9 @@ __MATH_REDIRCALL (exp, , (_Mdouble_));
 __MATH_REDIRCALL (exp10, , (_Mdouble_));
 
 /* pow10.  */
+# if !__MATH_DECLARING_FLOATN
 __MATH_REDIRCALL_2 (pow10, , (_Mdouble_), exp10);
+# endif
 #endif
 
 #ifdef __USE_ISOC99
@@ -146,7 +148,7 @@ __NTH (__REDIRFROM (lgamma, , _MSUF_) (_Mdouble_ __d))
 #endif
 
 #if ((defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)) \
-     && defined __extern_always_inline)
+     && defined __extern_always_inline) && !__MATH_DECLARING_FLOATN
 /* gamma.  */
 __extern_always_inline _Mdouble_
 __NTH (__REDIRFROM (gamma, , _MSUF_) (_Mdouble_ __d))
@@ -174,10 +176,11 @@ __MATH_REDIRCALL (pow, , (_Mdouble_, _Mdouble_));
 __MATH_REDIRCALL (remainder, , (_Mdouble_, _Mdouble_));
 #endif
 
-#if (__MATH_DECLARING_DOUBLE \
-     && (defined __USE_MISC \
-	 || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8))) \
-    || (!defined __MATH_DECLARE_LDOUBLE && defined __USE_MISC)
+#if ((__MATH_DECLARING_DOUBLE \
+      && (defined __USE_MISC \
+	  || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8))) \
+     || (!defined __MATH_DECLARE_LDOUBLE && defined __USE_MISC)) \
+    && !__MATH_DECLARING_FLOATN
 /* scalb.  */
 __MATH_REDIRCALL (scalb, , (_Mdouble_, _Mdouble_));
 #endif
diff --git a/math/math.h b/math/math.h
index b0b1932..03aadc0 100644
--- a/math/math.h
+++ b/math/math.h
@@ -626,11 +626,13 @@ extern int matherr (struct exception *__exc);
 # define _Mdouble_ double
 # define __MATH_DECLARING_DOUBLE 1
 # define __MATH_DECLARING_LDOUBLE 0
+# define __MATH_DECLARING_FLOATN 0
 # define _MSUF_
 # include <bits/math-finite.h>
 # undef _Mdouble_
 # undef __MATH_DECLARING_DOUBLE
 # undef __MATH_DECLARING_LDOUBLE
+# undef __MATH_DECLARING_FLOATN
 # undef _MSUF_
 
 /* When __USE_ISOC99 is defined, include math-finite for float and
@@ -641,11 +643,13 @@ extern int matherr (struct exception *__exc);
 #  define _Mdouble_ float
 #  define __MATH_DECLARING_DOUBLE 0
 #  define __MATH_DECLARING_LDOUBLE 0
+#  define __MATH_DECLARING_FLOATN 0
 #  define _MSUF_ f
 #  include <bits/math-finite.h>
 #  undef _Mdouble_
 #  undef __MATH_DECLARING_DOUBLE
 #  undef __MATH_DECLARING_LDOUBLE
+#  undef __MATH_DECLARING_FLOATN
 #  undef _MSUF_
 
 /* Include bits/math-finite.h for long double.  */
@@ -653,15 +657,32 @@ extern int matherr (struct exception *__exc);
 #   define _Mdouble_ long double
 #   define __MATH_DECLARING_DOUBLE 0
 #   define __MATH_DECLARING_LDOUBLE 1
+#   define __MATH_DECLARING_FLOATN 0
 #   define _MSUF_ l
 #   include <bits/math-finite.h>
 #   undef _Mdouble_
 #   undef __MATH_DECLARING_DOUBLE
 #   undef __MATH_DECLARING_LDOUBLE
+#   undef __MATH_DECLARING_FLOATN
 #   undef _MSUF_
 #  endif
 
 # endif /* __USE_ISOC99.  */
+
+/* Include bits/math-finite.h for float128.  */
+# if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#  define _Mdouble_ _Float128
+#  define __MATH_DECLARING_DOUBLE 0
+#  define __MATH_DECLARING_LDOUBLE 0
+#  define __MATH_DECLARING_FLOATN 1
+#  define _MSUF_ f128
+#  include <bits/math-finite.h>
+#  undef _Mdouble_
+#  undef __MATH_DECLARING_DOUBLE
+#  undef __MATH_DECLARING_LDOUBLE
+#  undef __MATH_DECLARING_FLOATN
+#  undef _MSUF_
+# endif
 #endif /* __FINITE_MATH_ONLY__ > 0.  */
 
 #ifdef __USE_ISOC99
-- 
2.4.11

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v4 1/5] float128: Add public _Float128 declarations to libm.
  2017-05-11 20:53 [PATCH v4 0/5] Add float128 functions and declarations to libm Gabriel F. T. Gomes
@ 2017-05-11 20:53 ` Gabriel F. T. Gomes
  2017-05-12 14:52   ` Joseph Myers
  2017-05-11 20:53 ` [PATCH v4 2/5] float128: Include math-finite.h for _Float128 Gabriel F. T. Gomes
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: Gabriel F. T. Gomes @ 2017-05-11 20:53 UTC (permalink / raw)
  To: libc-alpha

From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>

Changes since v3:

  - Removed bits/floatn-compat.h and moved all compiler hacks to the
    architecture-specific bits/floatn.h.  This patch does not add the
    compiler hacks for powerpc.  They are only added in the commit that
    actually enables float128 support on powerpc64le.
  - Fixed the definitions of __f128 and __CFLOAT128 to be always defined in
    library builds that have support for _Float128 (__HAVE_FLOAT128).
    Thus, this patch do not define these macros, which are only defined in
    the commit that actually enablesfloat128 support on powerpc64le.
  - Replaced __FLOATN_TYPE with __MATH_DECLARING_FLOATN.
  - Fixed the conditions for inclusion of bits/mathcalls-helper-functions.h
    and bits/mathcalls.h.
  - Use type-generic __builtin_signbit if GCC >= 6.0.

-- 8< --
This introduces the machine-dependent bits/floatn.h to control
the inclusion of _Float128 ABI.

	* bits/floatn.h: New file.
	* bits/huge_val_flt128.h: Likewise.

	* bits/libm-simd-decl-stubs.h (__DECL_SIMD_cosf128): New macro.
	(__DECL_SIMD_sinf128): Likewise.
	(__DECL_SIMD_sincosf128): Likewise.
	(__DECL_SIMD_logf128): Likewise.
	(__DECL_SIMD_expf128): Likewise.
	(__DECL_SIMD_powf128): Likewise.

	* math/Makefile (headers): Install bits/floatn.h and
	bits/huge_val_flt128.h.

	* math/bits/cmathcalls.h (_Mdouble_complex_): Only define if not
	defined.

	* math/mathcalls.h (drem): Only define if __MATH_DECLARING_FLOATN.
	(gamma): Likewise.
	(nexttoward): Likewise.
	(significand): Likewise.
	(pow10): Likewise.
	(scalb): Likewise.
	(finite): Likewise.
	(isinf): Likewise.
	(isnan): Likewise.

	* math/complex.h: Include bits/cmathcalls.h to get the declarations
	of float128 versions of complex functions.
	[__HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (CMPLXF128):
	Define macro.

	* math/math.h (__MATH_DECLARING_FLOATN): New macro to control
	declaration of _FloatN types.
	[__GNUC_PREREQ (6,0)] (signbit): Since GCC 6.0, __builtin_signbit
	is type-generic, so use it without __MATH_TG.
	[__HAVE_DISTINCT_FLOAT128] (isinf): This builtin is broken for
	_Float128 type on GCC < 7.0.  Explicitly call __isinff128 for
	_Float128 type and GCC < 7.0, otherwise use the builtin.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_Ef128): New _GNU_SOURCE enabled macro.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_LOG2Ef128): Likewise.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_LOG10Ef128): Likewise.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_LN2f128): Likewise.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_LN10f128): Likewise.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_PIf128): Likewise.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_PI_2f128): Likewise.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_PI_4f128): Likewise.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_1_PIf128): Likewise.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_2_PIf128): Likewise.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_SQRT2f128): Likewise.
	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(M_SQRT1_2f128): Likewise.
---
 bits/floatn.h               | 35 ++++++++++++++++++++++++
 bits/huge_val_flt128.h      | 23 ++++++++++++++++
 bits/libm-simd-decl-stubs.h |  6 +++++
 math/Makefile               |  3 ++-
 math/bits/cmathcalls.h      |  4 ++-
 math/bits/mathcalls.h       | 36 ++++++++++++++++---------
 math/complex.h              | 27 ++++++++++++++++++-
 math/math.h                 | 65 +++++++++++++++++++++++++++++++++++++++++++--
 8 files changed, 181 insertions(+), 18 deletions(-)
 create mode 100644 bits/floatn.h
 create mode 100644 bits/huge_val_flt128.h

diff --git a/bits/floatn.h b/bits/floatn.h
new file mode 100644
index 0000000..a806496
--- /dev/null
+++ b/bits/floatn.h
@@ -0,0 +1,35 @@
+/* Macros to control TS 18661-3 glibc features.
+   Copyright (C) 2017 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/>.  */
+
+/* Defined to 1 if the current compiler invocation provides a
+   floating-point type with the IEEE 754 binary128 format, and this glibc
+   includes corresponding *f128 interfaces for it.  */
+#define __HAVE_FLOAT128 0
+
+/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
+   from the default float, double and long double types in this glibc.  */
+#define __HAVE_DISTINCT_FLOAT128 0
+
+/* Defined to concatenate the literal suffix to be used with _Float128
+   types, if __HAVE_FLOAT128 is 1.
+   E.g.: #define __f128(x) x##f128.  */
+#undef __f128
+
+/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+   E.g.: #define __CFLOAT128 _Complex _Float128.  */
+#undef __CFLOAT128
diff --git a/bits/huge_val_flt128.h b/bits/huge_val_flt128.h
new file mode 100644
index 0000000..63c258e
--- /dev/null
+++ b/bits/huge_val_flt128.h
@@ -0,0 +1,23 @@
+/* Default `HUGE_VAL_F128' constant.
+   Copyright (C) 2017 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 _MATH_H
+# error "Never use <bits/huge_val_flt128.h> directly; include <math.h> instead."
+#endif
+
+#define HUGE_VAL_F128 (__builtin_huge_valf128 ())
diff --git a/bits/libm-simd-decl-stubs.h b/bits/libm-simd-decl-stubs.h
index 7328eb2..6794b9f 100644
--- a/bits/libm-simd-decl-stubs.h
+++ b/bits/libm-simd-decl-stubs.h
@@ -36,24 +36,30 @@
 #define __DECL_SIMD_cos
 #define __DECL_SIMD_cosf
 #define __DECL_SIMD_cosl
+#define __DECL_SIMD_cosf128
 
 #define __DECL_SIMD_sin
 #define __DECL_SIMD_sinf
 #define __DECL_SIMD_sinl
+#define __DECL_SIMD_sinf128
 
 #define __DECL_SIMD_sincos
 #define __DECL_SIMD_sincosf
 #define __DECL_SIMD_sincosl
+#define __DECL_SIMD_sincosf128
 
 #define __DECL_SIMD_log
 #define __DECL_SIMD_logf
 #define __DECL_SIMD_logl
+#define __DECL_SIMD_logf128
 
 #define __DECL_SIMD_exp
 #define __DECL_SIMD_expf
 #define __DECL_SIMD_expl
+#define __DECL_SIMD_expf128
 
 #define __DECL_SIMD_pow
 #define __DECL_SIMD_powf
 #define __DECL_SIMD_powl
+#define __DECL_SIMD_powf128
 #endif
diff --git a/math/Makefile b/math/Makefile
index 634c619..ff4aa00 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -29,7 +29,8 @@ headers		:= math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
 		   bits/math-finite.h bits/math-vector.h \
 		   bits/libm-simd-decl-stubs.h bits/iscanonical.h \
 		   bits/flt-eval-method.h bits/fp-fast.h bits/fp-logb.h \
-		   bits/long-double.h bits/mathcalls-helper-functions.h
+		   bits/long-double.h bits/mathcalls-helper-functions.h \
+		   bits/floatn.h bits/huge_val_flt128.h
 
 # FPU support code.
 aux		:= setfpucw fpu_control
diff --git a/math/bits/cmathcalls.h b/math/bits/cmathcalls.h
index 6e13930..7f042db 100644
--- a/math/bits/cmathcalls.h
+++ b/math/bits/cmathcalls.h
@@ -44,7 +44,9 @@
 #error "Never use <bits/cmathcalls.h> directly; include <complex.h> instead."
 #endif
 
-#define _Mdouble_complex_ _Mdouble_ _Complex
+#ifndef _Mdouble_complex_
+# define _Mdouble_complex_ _Mdouble_ _Complex
+#endif
 
 
 /* Trigonometric functions.  */
diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index 0d341fb..a3cc855 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -115,7 +115,9 @@ __MATHCALL (exp10,, (_Mdouble_ __x));
 #endif
 #ifdef __USE_GNU
 /* Another name occasionally used.  */
+# if !__MATH_DECLARING_FLOATN
 __MATHCALL (pow10,, (_Mdouble_ __x));
+# endif
 #endif
 
 #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
@@ -172,14 +174,16 @@ __MATHCALLX (floor,, (_Mdouble_ __x), (__const__));
 __MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y));
 
 #ifdef __USE_MISC
-# if (!defined __cplusplus \
-      || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
-      || __MATH_DECLARING_DOUBLE == 0) /* isinff or isinfl don't.  */
+# if ((!defined __cplusplus \
+       || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
+       || __MATH_DECLARING_DOUBLE == 0)) /* isinff or isinfl don't.  */ \
+      && !__MATH_DECLARING_FLOATN
 /* Return 0 if VALUE is finite or NaN, +1 if it
    is +Infinity, -1 if it is -Infinity.  */
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
 # endif
 
+# if !__MATH_DECLARING_FLOATN
 /* Return nonzero if VALUE is finite and not NaN.  */
 __MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
 
@@ -189,6 +193,8 @@ __MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y));
 
 /* Return the fractional part of X after dividing out `ilogb (X)'.  */
 __MATHCALL (significand,, (_Mdouble_ __x));
+# endif
+
 #endif /* Use misc.  */
 
 #ifdef __USE_ISOC99
@@ -203,9 +209,10 @@ __MATHCALLX (nan,, (const char *__tagb), (__const__));
 
 
 #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
-# if (!defined __cplusplus \
-      || __cplusplus < 201103L /* isnan conflicts with C++11.  */ \
-      || __MATH_DECLARING_DOUBLE == 0) /* isnanf or isnanl don't.  */
+# if ((!defined __cplusplus \
+       || __cplusplus < 201103L /* isnan conflicts with C++11.  */ \
+       || __MATH_DECLARING_DOUBLE == 0)) /* isnanf or isnanl don't.  */ \
+      && !__MATH_DECLARING_FLOATN
 /* Return nonzero if VALUE is not a number.  */
 __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
 # endif
@@ -235,8 +242,10 @@ __MATHCALL (tgamma,, (_Mdouble_));
 #endif
 
 #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
+# if !__MATH_DECLARING_FLOATN
 /* Obsolete alias for `lgamma'.  */
 __MATHCALL (gamma,, (_Mdouble_));
+# endif
 #endif
 
 #ifdef __USE_MISC
@@ -254,11 +263,11 @@ __MATHCALL (rint,, (_Mdouble_ __x));
 
 /* Return X + epsilon if X < Y, X - epsilon if X > Y.  */
 __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
-# if defined __USE_ISOC99 && !defined __LDBL_COMPAT
+# if defined __USE_ISOC99 && !defined __LDBL_COMPAT && !__MATH_DECLARING_FLOATN
 __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__));
 # endif
 
-#if __GLIBC_USE (IEC_60559_BFP_EXT)
+#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN
 /* Return X - epsilon.  */
 __MATHCALL (nextdown,, (_Mdouble_ __x));
 /* Return X + epsilon.  */
@@ -277,7 +286,7 @@ __MATHCALL (scalbn,, (_Mdouble_ __x, int __n));
 __MATHDECL (int,ilogb,, (_Mdouble_ __x));
 #endif
 
-#if __GLIBC_USE (IEC_60559_BFP_EXT)
+#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN
 /* Like ilogb, but returning long int.  */
 __MATHDECL (long int, llogb,, (_Mdouble_ __x));
 #endif
@@ -332,7 +341,7 @@ __MATHCALLX (fmin,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
 __MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
 #endif /* Use ISO C99.  */
 
-#if __GLIBC_USE (IEC_60559_BFP_EXT)
+#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN
 /* Round X to nearest integer value, rounding halfway cases to even.  */
 __MATHCALLX (roundeven,, (_Mdouble_ __x), (__const__));
 
@@ -385,9 +394,10 @@ __MATHDECL_1 (int, setpayload,, (_Mdouble_ *__x, _Mdouble_ __payload));
 __MATHDECL_1 (int, setpayloadsig,, (_Mdouble_ *__x, _Mdouble_ __payload));
 #endif
 
-#if defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
-			   && __MATH_DECLARING_DOUBLE	\
-			   && !defined __USE_XOPEN2K8)
+#if (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
+			    && __MATH_DECLARING_DOUBLE	  \
+			    && !defined __USE_XOPEN2K8))  \
+     && !__MATH_DECLARING_FLOATN
 /* Return X times (2 to the Nth power).  */
 __MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n));
 #endif
diff --git a/math/complex.h b/math/complex.h
index 59ce30e..9a730d3 100644
--- a/math/complex.h
+++ b/math/complex.h
@@ -22,11 +22,15 @@
 #ifndef _COMPLEX_H
 #define _COMPLEX_H	1
 
-#include <features.h>
+#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
+#include <bits/libc-header-start.h>
 
 /* Get general and ISO C99 specific information.  */
 #include <bits/mathdef.h>
 
+/* Gather machine-dependent _FloatN type support.  */
+#include <bits/floatn.h>
+
 __BEGIN_DECLS
 
 /* We might need to add support for more compilers here.  But since ISO
@@ -55,6 +59,10 @@ __BEGIN_DECLS
 # define CMPLXL(x, y) __builtin_complex ((long double) (x), (long double) (y))
 #endif
 
+#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+# define CMPLXF128(x, y) __builtin_complex ((_Float128) (x), (_Float128) (y))
+#endif
+
 /* The file <bits/cmathcalls.h> contains the prototypes for all the
    actual math functions.  These macros are used for those prototypes,
    so we can easily declare each function as both `name' and `__name',
@@ -84,6 +92,23 @@ __BEGIN_DECLS
 #undef	_Mdouble_
 #undef	__MATH_PRECNAME
 
+#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+# ifndef _Mfloat128_
+#  define _Mfloat128_		_Float128
+# endif
+/* GCC < 7 requires extra convincing to expose a complex float128 type.  */
+# ifdef __CFLOAT128
+#  undef _Mdouble_complex_
+#  define _Mdouble_complex_	__CFLOAT128
+# endif
+# define _Mdouble_		_Mfloat128_
+# define __MATH_PRECNAME(name)	name##f128
+# include <bits/cmathcalls.h>
+# undef _Mdouble_
+# undef __MATH_PRECNAME
+# undef _Mdouble_complex_
+#endif
+
 /* And the long double versions.  It is non-critical to define them
    here unconditionally since `long double' is required in ISO C99.  */
 #if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC)	\
diff --git a/math/math.h b/math/math.h
index cfaed0e..b0b1932 100644
--- a/math/math.h
+++ b/math/math.h
@@ -34,9 +34,17 @@ __BEGIN_DECLS
 /* Get machine-dependent vector math functions declarations.  */
 #include <bits/math-vector.h>
 
+/* Gather machine dependent type support.  */
+#include <bits/floatn.h>
+
 /* Get machine-dependent HUGE_VAL value (returned on overflow).
    On all IEEE754 machines, this is +Infinity.  */
 #include <bits/huge_val.h>
+
+#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+# include <bits/huge_val_flt128.h>
+#endif
+
 #ifdef __USE_ISOC99
 # include <bits/huge_valf.h>
 # include <bits/huge_vall.h>
@@ -208,11 +216,13 @@ enum
 #define _Mdouble_		double
 #define __MATH_PRECNAME(name,r)	__CONCAT(name,r)
 #define __MATH_DECLARING_DOUBLE  1
+#define __MATH_DECLARING_FLOATN  0
 #include <bits/mathcalls-helper-functions.h>
 #include <bits/mathcalls.h>
 #undef	_Mdouble_
 #undef	__MATH_PRECNAME
 #undef __MATH_DECLARING_DOUBLE
+#undef __MATH_DECLARING_FLOATN
 
 #ifdef __USE_ISOC99
 
@@ -226,11 +236,13 @@ enum
 # define _Mdouble_		_Mfloat_
 # define __MATH_PRECNAME(name,r) name##f##r
 # define __MATH_DECLARING_DOUBLE  0
+# define __MATH_DECLARING_FLOATN  0
 # include <bits/mathcalls-helper-functions.h>
 # include <bits/mathcalls.h>
 # undef	_Mdouble_
 # undef	__MATH_PRECNAME
 # undef __MATH_DECLARING_DOUBLE
+# undef __MATH_DECLARING_FLOATN
 
 # if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \
      || defined __LDBL_COMPAT \
@@ -269,16 +281,42 @@ extern long double __REDIRECT_NTH (nexttowardl,
 #  define _Mdouble_		_Mlong_double_
 #  define __MATH_PRECNAME(name,r) name##l##r
 #  define __MATH_DECLARING_DOUBLE  0
+#  define __MATH_DECLARING_FLOATN  0
 #  define __MATH_DECLARE_LDOUBLE   1
 #  include <bits/mathcalls-helper-functions.h>
 #  include <bits/mathcalls.h>
 #  undef _Mdouble_
 #  undef __MATH_PRECNAME
 #  undef __MATH_DECLARING_DOUBLE
+#  undef __MATH_DECLARING_FLOATN
 
 # endif /* !(__NO_LONG_DOUBLE_MATH && _LIBC) || __LDBL_COMPAT */
 
 #endif	/* Use ISO C99.  */
+
+/* Include the file of declarations again, this time using `_Float128'
+   instead of `double' and appending f128 to each function name.  */
+
+#if __HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)
+# ifndef _Mfloat128_
+#  define _Mfloat128_		_Float128
+# endif
+# define _Mdouble_		_Mfloat128_
+# define __MATH_PRECNAME(name,r) name##f128##r
+# define __MATH_DECLARING_DOUBLE  0
+# define __MATH_DECLARING_FLOATN  1
+# if __HAVE_DISTINCT_FLOAT128
+#  include <bits/mathcalls-helper-functions.h>
+# endif
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+#  include <bits/mathcalls.h>
+# endif
+# undef _Mdouble_
+# undef __MATH_PRECNAME
+# undef __MATH_DECLARING_DOUBLE
+# undef __MATH_DECLARING_FLOATN
+#endif /* __HAVE_DISTINCT_FLOAT128.  */
+
 #undef	__MATHDECL_1
 #undef	__MATHDECL
 #undef	__MATHCALL
@@ -348,7 +386,9 @@ enum
 # endif
 
 /* Return nonzero value if sign of X is negative.  */
-# if __GNUC_PREREQ (4,0)
+# if __GNUC_PREREQ (6,0)
+#  define signbit(x) __builtin_signbit (x)
+# elif __GNUC_PREREQ (4,0)
 #  define signbit(x) __MATH_TG ((x), __builtin_signbit, (x))
 # else
 #  define signbit(x) __MATH_TG ((x), __signbit, (x))
@@ -377,7 +417,13 @@ enum
 # endif
 
 /* Return nonzero value if X is positive or negative infinity.  */
-# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
+# if __HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7,0) \
+     && !defined __SUPPORT_SNAN__
+   /* __builtin_isinf_sign is broken for float128 only before GCC 7.0.  */
+#  define isinf(x) \
+    (__builtin_types_compatible_p (typeof (x), _Float128) \
+     ? __isinff128 (x) : __builtin_isinf_sign (x))
+# elif __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
 #  define isinf(x) __builtin_isinf_sign (x)
 # else
 #  define isinf(x) __MATH_TG ((x), __isinf, (x))
@@ -529,6 +575,21 @@ extern int matherr (struct exception *__exc);
 # define M_SQRT1_2l	0.707106781186547524400844362104849039L /* 1/sqrt(2) */
 #endif
 
+#if __HAVE_FLOAT128 && defined __USE_GNU
+# define M_Ef128	__f128 (2.718281828459045235360287471352662498) /* e */
+# define M_LOG2Ef128	__f128 (1.442695040888963407359924681001892137) /* log_2 e */
+# define M_LOG10Ef128	__f128 (0.434294481903251827651128918916605082) /* log_10 e */
+# define M_LN2f128	__f128 (0.693147180559945309417232121458176568) /* log_e 2 */
+# define M_LN10f128	__f128 (2.302585092994045684017991454684364208) /* log_e 10 */
+# define M_PIf128	__f128 (3.141592653589793238462643383279502884) /* pi */
+# define M_PI_2f128	__f128 (1.570796326794896619231321691639751442) /* pi/2 */
+# define M_PI_4f128	__f128 (0.785398163397448309615660845819875721) /* pi/4 */
+# define M_1_PIf128	__f128 (0.318309886183790671537767526745028724) /* 1/pi */
+# define M_2_PIf128	__f128 (0.636619772367581343075535053490057448) /* 2/pi */
+# define M_2_SQRTPIf128	__f128 (1.128379167095512573896158903121545172) /* 2/sqrt(pi) */
+# define M_SQRT2f128	__f128 (1.414213562373095048801688724209698079) /* sqrt(2) */
+# define M_SQRT1_2f128	__f128 (0.707106781186547524400844362104849039) /* 1/sqrt(2) */
+#endif
 
 /* When compiling in strict ISO C compatible mode we must not use the
    inline functions since they, among other things, do not set the
-- 
2.4.11

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v4 4/5] float128: Enable use of IEEE wrapper templates
  2017-05-11 20:53 [PATCH v4 0/5] Add float128 functions and declarations to libm Gabriel F. T. Gomes
                   ` (3 preceding siblings ...)
  2017-05-11 20:53 ` [PATCH v4 5/5] float128: Add wrappers to override ldbl-128 as float128 Gabriel F. T. Gomes
@ 2017-05-11 20:53 ` Gabriel F. T. Gomes
  2017-05-12 15:06   ` Joseph Myers
  4 siblings, 1 reply; 16+ messages in thread
From: Gabriel F. T. Gomes @ 2017-05-11 20:53 UTC (permalink / raw)
  To: libc-alpha

No changes since v2/v3.

-- 8< --
The templates for the IEEE functions wrappers implement wrappers that
do not rely on _LIB_VERSION / matherr / __kernel_standard
functionality to set errno and fix the return value of the functions.
The wrappers are ready to be used by all floating-point types, however
they will first be used by float128, since the old wrappers for float,
double, and long double need to be first deprecated and versioned.

This commits defines __USE_WRAPPER_TEMPLATE to 1 for float128 files,
so that the new wrapper templates are used for this type.

2017-02-01  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>

	* sysdeps/generic/math-type-macros-float128.h
	(__USE_WRAPPER_TEMPLATE): Define to 1 to enable use of the
	wrapper templates.
---
 sysdeps/generic/math-type-macros-float128.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sysdeps/generic/math-type-macros-float128.h b/sysdeps/generic/math-type-macros-float128.h
index dcb8560..5d734db 100644
--- a/sysdeps/generic/math-type-macros-float128.h
+++ b/sysdeps/generic/math-type-macros-float128.h
@@ -36,4 +36,7 @@
 /* Supply the generic macros.  */
 #include <math-type-macros.h>
 
+/* Use the type-generic wrapper templates.  */
+#define __USE_WRAPPER_TEMPLATE 1
+
 #endif
-- 
2.4.11

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v4 3/5] float128: Add private _Float128 declarations for libm.
  2017-05-11 20:53 [PATCH v4 0/5] Add float128 functions and declarations to libm Gabriel F. T. Gomes
  2017-05-11 20:53 ` [PATCH v4 1/5] float128: Add public _Float128 " Gabriel F. T. Gomes
  2017-05-11 20:53 ` [PATCH v4 2/5] float128: Include math-finite.h for _Float128 Gabriel F. T. Gomes
@ 2017-05-11 20:53 ` Gabriel F. T. Gomes
  2017-05-12 15:06   ` Joseph Myers
  2017-05-11 20:53 ` [PATCH v4 5/5] float128: Add wrappers to override ldbl-128 as float128 Gabriel F. T. Gomes
  2017-05-11 20:53 ` [PATCH v4 4/5] float128: Enable use of IEEE wrapper templates Gabriel F. T. Gomes
  4 siblings, 1 reply; 16+ messages in thread
From: Gabriel F. T. Gomes @ 2017-05-11 20:53 UTC (permalink / raw)
  To: libc-alpha

From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>

Changes since v3:

  - Assume that __CFLOAT128 will be defined to declare
    __kernel_casinhf128 and CFLOAT.
  - Replace __MATH_DECLARING_FLOAT128 with __MATH_DECLARING_FLOATN.
  - Remove the implementation of signbitf128 (no such interface).

-- 8< --
Add the necessary bits to the private headers to support
building the _Float128 libm functions.

A local override for float.h is provided to include the
missing *FLT128 macros implied by TS 18661-3 for this
type when compiling prior to GCC 7.

	* include/complex.h (__kernel_casinhf128): New declaration.
	* include/float.h: New file.
	* include/math.h (__finitef128): Add a hidden def.
	(__isinff128): Likewise.
	(__isnanf128): Likewise.
	(__fpclassify): Likewise.
	(__issignalling): Likewise.
	(__expf128): Likewise.
	(__expm1f128): Likewise.

	* sysdeps/generic/fix-fp-int-convert-overflow.h:
	(FIX_FLT128_LONG_CONVERT_OVERFLOW): New macro.
	(FIX_FLT128_LLONG_CONVERT_OVERFLOW): Likewise.

	* sysdeps/generic/math-type-macros-float128.h: New file.

	* sysdeps/generic/math_private.h: Include math_private_calls.h
	for _Float128.
	(__isinff128): New inline implementation used when GCC < 7.0,
	since in this case __builtin_isinf_sign is broken.
	(fabsf128): New inline implementation that calls the builtin.
	(__EXPR_FLT128): New macro.
	(min_of_type): Optionally include _Float128 types too.

	* sysdeps/generic/math_private_calls.h (__kernel_sincos):
	Declare for _Float128.
	(__kernel_rem_pio2): Likewise.

	* sysdeps/ieee754/ldbl-opt/s_sin.c:
	(__DECL_SIMD_sincos_disablef128): New macro.
---
 include/complex.h                             |  3 ++
 include/float.h                               | 31 ++++++++++++++++
 include/math.h                                | 13 +++++++
 sysdeps/generic/fix-fp-int-convert-overflow.h |  2 ++
 sysdeps/generic/math-type-macros-float128.h   | 39 ++++++++++++++++++++
 sysdeps/generic/math_private.h                | 51 ++++++++++++++++++++++++++-
 sysdeps/generic/math_private_calls.h          |  4 +--
 sysdeps/ieee754/ldbl-opt/s_sin.c              |  1 +
 8 files changed, 141 insertions(+), 3 deletions(-)
 create mode 100644 include/float.h
 create mode 100644 sysdeps/generic/math-type-macros-float128.h

diff --git a/include/complex.h b/include/complex.h
index 082e71f..2c86709 100644
--- a/include/complex.h
+++ b/include/complex.h
@@ -8,6 +8,9 @@
 extern complex float __kernel_casinhf (complex float z, int adj);
 extern complex double __kernel_casinh (complex double z, int adj);
 extern complex long double __kernel_casinhl (complex long double z, int adj);
+#  if __HAVE_DISTINCT_FLOAT128
+extern __CFLOAT128 __kernel_casinhf128 (__CFLOAT128 z, int adj);
+#  endif
 # endif
 
 #endif
diff --git a/include/float.h b/include/float.h
new file mode 100644
index 0000000..20c4acb
--- /dev/null
+++ b/include/float.h
@@ -0,0 +1,31 @@
+#ifndef _LIBC_FLOAT_H
+#define _LIBC_FLOAT_H
+
+#ifndef _ISOMAC
+# define __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+
+#include_next <float.h>
+
+/* Supplement float.h macros for _Float128 for older compilers
+   which do not yet support the type.  These are described in
+   TS 18661-3.  */
+#ifndef _ISOMAC
+# include <features.h>
+# include <bits/floatn.h>
+# if !__GNUC_PREREQ (7, 0) && __HAVE_DISTINCT_FLOAT128
+#  define FLT128_MANT_DIG	113
+#  define FLT128_DECIMAL_DIG	36
+#  define FLT128_DIG		33
+#  define FLT128_MIN_EXP	(-16381)
+#  define FLT128_MIN_10_EXP	(-4931)
+#  define FLT128_MAX_EXP	16384
+#  define FLT128_MAX_10_EXP	4932
+#  define FLT128_MAX		1.18973149535723176508575932662800702e+4932Q
+#  define FLT128_EPSILON	1.92592994438723585305597794258492732e-34Q
+#  define FLT128_MIN		3.36210314311209350626267781732175260e-4932Q
+#  define FLT128_TRUE_MIN	6.47517511943802511092443895822764655e-4966Q
+# endif
+#endif
+
+#endif /* _LIBC_FLOAT_H */
diff --git a/include/math.h b/include/math.h
index a4f5562..83debf8 100644
--- a/include/math.h
+++ b/include/math.h
@@ -21,6 +21,12 @@ hidden_proto (__finitel)
 hidden_proto (__isinfl)
 hidden_proto (__isnanl)
 #  endif
+
+#  if __HAVE_DISTINCT_FLOAT128
+hidden_proto (__finitef128)
+hidden_proto (__isinff128)
+hidden_proto (__isnanf128)
+#  endif
 # endif
 
 libm_hidden_proto (__fpclassify)
@@ -38,5 +44,12 @@ libm_hidden_proto (__expl)
 libm_hidden_proto (__expm1l)
 # endif
 
+# if __HAVE_DISTINCT_FLOAT128
+libm_hidden_proto (__fpclassifyf128)
+libm_hidden_proto (__issignalingf128)
+libm_hidden_proto (__expf128)
+libm_hidden_proto (__expm1f128)
+# endif
+
 #endif
 #endif
diff --git a/sysdeps/generic/fix-fp-int-convert-overflow.h b/sysdeps/generic/fix-fp-int-convert-overflow.h
index f53eaf0..4b0cd91 100644
--- a/sysdeps/generic/fix-fp-int-convert-overflow.h
+++ b/sysdeps/generic/fix-fp-int-convert-overflow.h
@@ -29,5 +29,7 @@
 #define FIX_DBL_LLONG_CONVERT_OVERFLOW 0
 #define FIX_LDBL_LONG_CONVERT_OVERFLOW 0
 #define FIX_LDBL_LLONG_CONVERT_OVERFLOW 0
+#define FIX_FLT128_LONG_CONVERT_OVERFLOW 0
+#define FIX_FLT128_LLONG_CONVERT_OVERFLOW 0
 
 #endif /* fix-fp-int-convert-overflow.h */
diff --git a/sysdeps/generic/math-type-macros-float128.h b/sysdeps/generic/math-type-macros-float128.h
new file mode 100644
index 0000000..dcb8560
--- /dev/null
+++ b/sysdeps/generic/math-type-macros-float128.h
@@ -0,0 +1,39 @@
+/* Helper macros for _Float128 variants of type generic functions of libm.
+   Copyright (C) 2017 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 _MATH_TYPE_MACROS_FLOAT128
+#define _MATH_TYPE_MACROS_FLOAT128
+
+#include <math.h>
+#include <complex.h>
+
+#define M_LIT(c) __f128 (c)
+#define M_PFX FLT128
+#define M_SUF(c) c ## f128
+#define FLOAT _Float128
+#define M_STRTO_NAN __strtof128_nan
+
+#define CFLOAT __CFLOAT128
+
+#define M_MLIT(c) c ## f128
+
+
+/* Supply the generic macros.  */
+#include <math-type-macros.h>
+
+#endif
diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h
index 4d8a35f..6ea5e25 100644
--- a/sysdeps/generic/math_private.h
+++ b/sysdeps/generic/math_private.h
@@ -23,6 +23,9 @@
 #include <float.h>
 #include <get-rounding-mode.h>
 
+/* Gather machine dependent _Floatn support.  */
+#include <bits/floatn.h>
+
 /* The original fdlibm code used statements like:
 	n0 = ((*(int*)&one)>>29)^1;		* index of high word *
 	ix0 = *(n0+(int*)&x);			* high word of x *
@@ -211,6 +214,41 @@ do {								\
 #undef _MSUF_
 #undef _Mdouble_
 
+#if __HAVE_DISTINCT_FLOAT128
+# define _Mdouble_ _Float128
+# define _MSUF_ f128
+# define __MATH_DECLARING_FLOATN
+# include <math_private_calls.h>
+# undef __MATH_DECLARING_FLOATN
+# undef _MSUF_
+# undef _Mdouble_
+#endif
+
+#if __HAVE_DISTINCT_FLOAT128
+
+/* __builtin_isinf_sign is broken in GCC < 7 for float128.  */
+# if ! __GNUC_PREREQ (7, 0)
+#  include <ieee754_float128.h>
+extern inline int
+__isinff128 (_Float128 x)
+{
+  int64_t hx, lx;
+  GET_FLOAT128_WORDS64 (hx, lx, x);
+  lx |= (hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL;
+  lx |= -lx;
+  return ~(lx >> 63) & (hx >> 62);
+}
+# endif
+
+extern inline _Float128
+fabsf128 (_Float128 x)
+{
+  return __builtin_fabsf128 (x);
+}
+#endif
+
+
+
 /* fdlibm kernel function */
 extern double __kernel_standard (double,double,int);
 extern float __kernel_standard_f (float,float,int);
@@ -263,13 +301,24 @@ extern void __docos (double __x, double __dx, double __v[]);
    })
 #endif
 
+#if __HAVE_DISTINCT_FLOAT128
+# define __EXPR_FLT128(x, yes, no)				\
+  __builtin_choose_expr (__builtin_types_compatible_p		\
+			 (__typeof (x), long double), no, yes)
+#else
+# define __EXPR_FLT128(x, yes, no) no
+#endif
+
+
 #define fabs_tg(x) __MATH_TG ((x), (__typeof (x)) __builtin_fabs, (x))
+
 #define min_of_type(type) __builtin_choose_expr		\
   (__builtin_types_compatible_p (type, float),		\
    FLT_MIN,						\
    __builtin_choose_expr				\
    (__builtin_types_compatible_p (type, double),	\
-    DBL_MIN, LDBL_MIN))
+    DBL_MIN,						\
+    __EXPR_FLT128 (x, FLT128_MIN, LDBL_MIN)))
 
 /* If X (which is not a NaN) is subnormal, force an underflow
    exception.  */
diff --git a/sysdeps/generic/math_private_calls.h b/sysdeps/generic/math_private_calls.h
index 8c1d304..34bbd5e 100644
--- a/sysdeps/generic/math_private_calls.h
+++ b/sysdeps/generic/math_private_calls.h
@@ -64,12 +64,12 @@ extern _Mdouble_ __MSUF (__kernel_sin) (_Mdouble_, _Mdouble_, int);
 extern _Mdouble_ __MSUF (__kernel_cos) (_Mdouble_, _Mdouble_);
 extern _Mdouble_ __MSUF (__kernel_tan) (_Mdouble_, _Mdouble_, int);
 
-#if defined __MATH_DECLARING_LONG_DOUBLE
+#if defined __MATH_DECLARING_LONG_DOUBLE || defined __MATH_DECLARING_FLOATN
 extern void __MSUF (__kernel_sincos) (_Mdouble_, _Mdouble_,
 				      _Mdouble_ *, _Mdouble_ *, int);
 #endif
 
-#if !defined __MATH_DECLARING_LONG_DOUBLE
+#if !defined __MATH_DECLARING_LONG_DOUBLE || defined __MATH_DECLARING_FLOATN
 extern int __MSUF (__kernel_rem_pio2) (_Mdouble_ *, _Mdouble_ *, int,
 				       int, int, const int32_t *);
 #endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_sin.c b/sysdeps/ieee754/ldbl-opt/s_sin.c
index 04e60e2..6932ccc 100644
--- a/sysdeps/ieee754/ldbl-opt/s_sin.c
+++ b/sysdeps/ieee754/ldbl-opt/s_sin.c
@@ -4,6 +4,7 @@
 #define __DECL_SIMD_sincos_disable
 #define __DECL_SIMD_sincos_disablef
 #define __DECL_SIMD_sincos_disablel
+#define __DECL_SIMD_sincos_disablef128
 #include <math_ldbl_opt.h>
 #undef NAN
 #undef sincos
-- 
2.4.11

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v4 5/5] float128: Add wrappers to override ldbl-128 as float128.
  2017-05-11 20:53 [PATCH v4 0/5] Add float128 functions and declarations to libm Gabriel F. T. Gomes
                   ` (2 preceding siblings ...)
  2017-05-11 20:53 ` [PATCH v4 3/5] float128: Add private _Float128 declarations for libm Gabriel F. T. Gomes
@ 2017-05-11 20:53 ` Gabriel F. T. Gomes
  2017-05-12 16:10   ` Joseph Myers
  2017-05-11 20:53 ` [PATCH v4 4/5] float128: Enable use of IEEE wrapper templates Gabriel F. T. Gomes
  4 siblings, 1 reply; 16+ messages in thread
From: Gabriel F. T. Gomes @ 2017-05-11 20:53 UTC (permalink / raw)
  To: libc-alpha

From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>

Changes since v3:

  - Removed s_canonicalizef128.c and w_llogbf128.c since the type-generic
    template machinery takes care of them automatically.
  - Declare SNANF128 even if __STDC_WANT_IEC_60559_BFP_EXT__ is not 1, as
    mandated by TS-18661-3.
  - Defined FUNC as fromfpxf128 (was fromfpxl) so that it is consistent
    with the rest of the float128 function implementation that use
    templated implementation.  Also removed the overrides for fromfpl,
    fromfpxl, ufromfpl, and ufromfpxl, since these overrides are not used.
  - Defined the override of signbitl to signbitf128_do_not_use (was
    signbitf128), since signbitf128 is not in TS-18661-3.
  - Replace use of __L() with __f128().

-- 8< --
This change defines float128_private.h which contains
macros used to override long double naming conventions
when building a ldbl file.

2017-05-09  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
	    Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
	    Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>

	* math/math.h [__HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(SNANF128): New macro.
	* math/s_fmaxmag_template.c: Include math_private.h in order to
	make inline expansion of fabs128().
	* math/s_fminmag_template.c: Likewise.

	* sysdeps/ieee754/float128/e_acosf128.c: New file.
	* sysdeps/ieee754/float128/e_acoshf128.c: New file.
	* sysdeps/ieee754/float128/e_asinf128.c: New file.
	* sysdeps/ieee754/float128/e_atan2f128.c: New file.
	* sysdeps/ieee754/float128/e_atanhf128.c: New file.
	* sysdeps/ieee754/float128/e_coshf128.c: New file.
	* sysdeps/ieee754/float128/e_exp10f128.c: New file.
	* sysdeps/ieee754/float128/e_exp2f128.c: New file.
	* sysdeps/ieee754/float128/e_expf128.c: New file.
	* sysdeps/ieee754/float128/e_fmodf128.c: New file.
	* sysdeps/ieee754/float128/e_gammaf128_r.c: New file.
	* sysdeps/ieee754/float128/e_hypotf128.c: New file.
	* sysdeps/ieee754/float128/e_ilogbf128.c: New file.
	* sysdeps/ieee754/float128/e_j0f128.c: New file.
	* sysdeps/ieee754/float128/e_j1f128.c: New file.
	* sysdeps/ieee754/float128/e_jnf128.c: New file.
	* sysdeps/ieee754/float128/e_lgammaf128.c: New file.
	* sysdeps/ieee754/float128/e_lgammaf128_r.c: New file.
	* sysdeps/ieee754/float128/e_log10f128.c: New file.
	* sysdeps/ieee754/float128/e_log2f128.c: New file.
	* sysdeps/ieee754/float128/e_logf128.c: New file.
	* sysdeps/ieee754/float128/e_powf128.c: New file.
	* sysdeps/ieee754/float128/e_rem_pio2f128.c: New file.
	* sysdeps/ieee754/float128/e_remainderf128.c: New file.
	* sysdeps/ieee754/float128/e_scalbf128.c: New file.
	* sysdeps/ieee754/float128/e_sinhf128.c: New file.
	* sysdeps/ieee754/float128/e_sqrtf128.c: New file.
	* sysdeps/ieee754/float128/float128_private.h: New file.
	* sysdeps/ieee754/float128/gamma_productf128.c: New file.
	* sysdeps/ieee754/float128/ieee754_float128.h: New file.
	* sysdeps/ieee754/float128/k_cosf128.c: New file.
	* sysdeps/ieee754/float128/k_rem_pio2f128.c: New file.
	* sysdeps/ieee754/float128/k_sincosf128.c: New file.
	* sysdeps/ieee754/float128/k_sinf128.c: New file.
	* sysdeps/ieee754/float128/k_tanf128.c: New file.
	* sysdeps/ieee754/float128/lgamma_negf128.c: New file.
	* sysdeps/ieee754/float128/lgamma_productf128.c: New file.
	* sysdeps/ieee754/float128/s_asinhf128.c: New file.
	* sysdeps/ieee754/float128/s_atanf128.c: New file.
	* sysdeps/ieee754/float128/s_cbrtf128.c: New file.
	* sysdeps/ieee754/float128/s_ceilf128.c: New file.
	* sysdeps/ieee754/float128/s_copysignf128.c: New file.
	* sysdeps/ieee754/float128/s_cosf128.c: New file.
	* sysdeps/ieee754/float128/s_erff128.c: New file.
	* sysdeps/ieee754/float128/s_expm1f128.c: New file.
	* sysdeps/ieee754/float128/s_fabsf128.c: New file.
	* sysdeps/ieee754/float128/s_finitef128.c: New file.
	* sysdeps/ieee754/float128/s_floorf128.c: New file.
	* sysdeps/ieee754/float128/s_fmaf128.c: New file.
	* sysdeps/ieee754/float128/s_fpclassifyf128.c: New file.
	* sysdeps/ieee754/float128/s_frexpf128.c: New file.
	* sysdeps/ieee754/float128/s_fromfpf128.c: New file.
	* sysdeps/ieee754/float128/s_fromfpxf128.c: New file.
	* sysdeps/ieee754/float128/s_getpayloadf128.c: New file.
	* sysdeps/ieee754/float128/s_isinff128.c: New file.
	* sysdeps/ieee754/float128/s_isnanf128.c: New file.
	* sysdeps/ieee754/float128/s_issignalingf128.c: New file.
	* sysdeps/ieee754/float128/s_llrintf128.c: New file.
	* sysdeps/ieee754/float128/s_llroundf128.c: New file.
	* sysdeps/ieee754/float128/s_log1pf128.c: New file.
	* sysdeps/ieee754/float128/s_logbf128.c: New file.
	* sysdeps/ieee754/float128/s_lrintf128.c: New file.
	* sysdeps/ieee754/float128/s_lroundf128.c: New file.
	* sysdeps/ieee754/float128/s_modff128.c: New file.
	* sysdeps/ieee754/float128/s_nearbyintf128.c: New file.
	* sysdeps/ieee754/float128/s_nextafterf128.c: New file.
	* sysdeps/ieee754/float128/s_nexttowardf128.c: New file.
	* sysdeps/ieee754/float128/s_nextupf128.c: New file.
	* sysdeps/ieee754/float128/s_remquof128.c: New file.
	* sysdeps/ieee754/float128/s_rintf128.c: New file.
	* sysdeps/ieee754/float128/s_roundevenf128.c: New file.
	* sysdeps/ieee754/float128/s_roundf128.c: New file.
	* sysdeps/ieee754/float128/s_scalblnf128.c: New file.
	* sysdeps/ieee754/float128/s_scalbnf128.c: New file.
	* sysdeps/ieee754/float128/s_setpayloadf128.c: New file.
	* sysdeps/ieee754/float128/s_setpayloadsigf128.c: New file.
	* sysdeps/ieee754/float128/s_signbitf128.c: New file.
	* sysdeps/ieee754/float128/s_significandf128.c: New file.
	* sysdeps/ieee754/float128/s_sincosf128.c: New file.
	* sysdeps/ieee754/float128/s_sinf128.c: New file.
	* sysdeps/ieee754/float128/s_tanf128.c: New file.
	* sysdeps/ieee754/float128/s_tanhf128.c: New file.
	* sysdeps/ieee754/float128/s_totalorderf128.c: New file.
	* sysdeps/ieee754/float128/s_totalordermagf128.c: New file.
	* sysdeps/ieee754/float128/s_truncf128.c: New file.
	* sysdeps/ieee754/float128/s_ufromfpf128.c: New file.
	* sysdeps/ieee754/float128/s_ufromfpxf128.c: New file.
	* sysdeps/ieee754/float128/t_sincosf128.c: New file.
	* sysdeps/ieee754/float128/x2y2m1f128.c: New file.

	* sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h:
	(__iscanonicalf128): Define as a macro.
---
 math/math.h                                    |   3 +
 math/s_fmaxmag_template.c                      |   1 +
 math/s_fminmag_template.c                      |   1 +
 sysdeps/ieee754/float128/e_acosf128.c          |   2 +
 sysdeps/ieee754/float128/e_acoshf128.c         |   2 +
 sysdeps/ieee754/float128/e_asinf128.c          |   2 +
 sysdeps/ieee754/float128/e_atan2f128.c         |   2 +
 sysdeps/ieee754/float128/e_atanhf128.c         |   2 +
 sysdeps/ieee754/float128/e_coshf128.c          |   2 +
 sysdeps/ieee754/float128/e_exp10f128.c         |   2 +
 sysdeps/ieee754/float128/e_exp2f128.c          |  54 ++++
 sysdeps/ieee754/float128/e_expf128.c           |   2 +
 sysdeps/ieee754/float128/e_fmodf128.c          |   2 +
 sysdeps/ieee754/float128/e_gammaf128_r.c       |   2 +
 sysdeps/ieee754/float128/e_hypotf128.c         |   2 +
 sysdeps/ieee754/float128/e_ilogbf128.c         |   2 +
 sysdeps/ieee754/float128/e_j0f128.c            |   2 +
 sysdeps/ieee754/float128/e_j1f128.c            |   2 +
 sysdeps/ieee754/float128/e_jnf128.c            |   2 +
 sysdeps/ieee754/float128/e_lgammaf128.c        |   1 +
 sysdeps/ieee754/float128/e_lgammaf128_r.c      |   2 +
 sysdeps/ieee754/float128/e_log10f128.c         |   2 +
 sysdeps/ieee754/float128/e_log2f128.c          |   2 +
 sysdeps/ieee754/float128/e_logf128.c           |   2 +
 sysdeps/ieee754/float128/e_powf128.c           |   2 +
 sysdeps/ieee754/float128/e_rem_pio2f128.c      |   2 +
 sysdeps/ieee754/float128/e_remainderf128.c     |   2 +
 sysdeps/ieee754/float128/e_scalbf128.c         |   1 +
 sysdeps/ieee754/float128/e_sinhf128.c          |   2 +
 sysdeps/ieee754/float128/e_sqrtf128.c          |   2 +
 sysdeps/ieee754/float128/float128_private.h    | 326 +++++++++++++++++++++++++
 sysdeps/ieee754/float128/gamma_productf128.c   |   2 +
 sysdeps/ieee754/float128/ieee754_float128.h    | 140 +++++++++++
 sysdeps/ieee754/float128/k_cosf128.c           |   2 +
 sysdeps/ieee754/float128/k_rem_pio2f128.c      |   2 +
 sysdeps/ieee754/float128/k_sincosf128.c        |   2 +
 sysdeps/ieee754/float128/k_sinf128.c           |   2 +
 sysdeps/ieee754/float128/k_tanf128.c           |   2 +
 sysdeps/ieee754/float128/lgamma_negf128.c      |   2 +
 sysdeps/ieee754/float128/lgamma_productf128.c  |   2 +
 sysdeps/ieee754/float128/s_asinhf128.c         |   2 +
 sysdeps/ieee754/float128/s_atanf128.c          |   2 +
 sysdeps/ieee754/float128/s_cbrtf128.c          |   2 +
 sysdeps/ieee754/float128/s_ceilf128.c          |   2 +
 sysdeps/ieee754/float128/s_copysignf128.c      |   2 +
 sysdeps/ieee754/float128/s_cosf128.c           |   2 +
 sysdeps/ieee754/float128/s_erff128.c           |   2 +
 sysdeps/ieee754/float128/s_expm1f128.c         |   2 +
 sysdeps/ieee754/float128/s_fabsf128.c          |   2 +
 sysdeps/ieee754/float128/s_finitef128.c        |   2 +
 sysdeps/ieee754/float128/s_floorf128.c         |   2 +
 sysdeps/ieee754/float128/s_fmaf128.c           |   2 +
 sysdeps/ieee754/float128/s_fpclassifyf128.c    |   2 +
 sysdeps/ieee754/float128/s_frexpf128.c         |   2 +
 sysdeps/ieee754/float128/s_fromfpf128.c        |   5 +
 sysdeps/ieee754/float128/s_fromfpxf128.c       |   5 +
 sysdeps/ieee754/float128/s_getpayloadf128.c    |   2 +
 sysdeps/ieee754/float128/s_isinff128.c         |   2 +
 sysdeps/ieee754/float128/s_isnanf128.c         |   2 +
 sysdeps/ieee754/float128/s_issignalingf128.c   |   2 +
 sysdeps/ieee754/float128/s_llrintf128.c        |   2 +
 sysdeps/ieee754/float128/s_llroundf128.c       |   2 +
 sysdeps/ieee754/float128/s_log1pf128.c         |   2 +
 sysdeps/ieee754/float128/s_logbf128.c          |   2 +
 sysdeps/ieee754/float128/s_lrintf128.c         |   2 +
 sysdeps/ieee754/float128/s_lroundf128.c        |   2 +
 sysdeps/ieee754/float128/s_modff128.c          |   2 +
 sysdeps/ieee754/float128/s_nearbyintf128.c     |   2 +
 sysdeps/ieee754/float128/s_nextafterf128.c     |   2 +
 sysdeps/ieee754/float128/s_nexttowardf128.c    |   1 +
 sysdeps/ieee754/float128/s_nextupf128.c        |   2 +
 sysdeps/ieee754/float128/s_remquof128.c        |   2 +
 sysdeps/ieee754/float128/s_rintf128.c          |   2 +
 sysdeps/ieee754/float128/s_roundevenf128.c     |   2 +
 sysdeps/ieee754/float128/s_roundf128.c         |   2 +
 sysdeps/ieee754/float128/s_scalblnf128.c       |   2 +
 sysdeps/ieee754/float128/s_scalbnf128.c        |   2 +
 sysdeps/ieee754/float128/s_setpayloadf128.c    |   4 +
 sysdeps/ieee754/float128/s_setpayloadsigf128.c |   4 +
 sysdeps/ieee754/float128/s_signbitf128.c       |   2 +
 sysdeps/ieee754/float128/s_significandf128.c   |   1 +
 sysdeps/ieee754/float128/s_sincosf128.c        |   2 +
 sysdeps/ieee754/float128/s_sinf128.c           |   2 +
 sysdeps/ieee754/float128/s_tanf128.c           |   2 +
 sysdeps/ieee754/float128/s_tanhf128.c          |   2 +
 sysdeps/ieee754/float128/s_totalorderf128.c    |   2 +
 sysdeps/ieee754/float128/s_totalordermagf128.c |   2 +
 sysdeps/ieee754/float128/s_truncf128.c         |   2 +
 sysdeps/ieee754/float128/s_ufromfpf128.c       |   5 +
 sysdeps/ieee754/float128/s_ufromfpxf128.c      |   5 +
 sysdeps/ieee754/float128/t_sincosf128.c        |   2 +
 sysdeps/ieee754/float128/x2y2m1f128.c          |   2 +
 sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h |   3 +
 93 files changed, 712 insertions(+)
 create mode 100644 sysdeps/ieee754/float128/e_acosf128.c
 create mode 100644 sysdeps/ieee754/float128/e_acoshf128.c
 create mode 100644 sysdeps/ieee754/float128/e_asinf128.c
 create mode 100644 sysdeps/ieee754/float128/e_atan2f128.c
 create mode 100644 sysdeps/ieee754/float128/e_atanhf128.c
 create mode 100644 sysdeps/ieee754/float128/e_coshf128.c
 create mode 100644 sysdeps/ieee754/float128/e_exp10f128.c
 create mode 100644 sysdeps/ieee754/float128/e_exp2f128.c
 create mode 100644 sysdeps/ieee754/float128/e_expf128.c
 create mode 100644 sysdeps/ieee754/float128/e_fmodf128.c
 create mode 100644 sysdeps/ieee754/float128/e_gammaf128_r.c
 create mode 100644 sysdeps/ieee754/float128/e_hypotf128.c
 create mode 100644 sysdeps/ieee754/float128/e_ilogbf128.c
 create mode 100644 sysdeps/ieee754/float128/e_j0f128.c
 create mode 100644 sysdeps/ieee754/float128/e_j1f128.c
 create mode 100644 sysdeps/ieee754/float128/e_jnf128.c
 create mode 100644 sysdeps/ieee754/float128/e_lgammaf128.c
 create mode 100644 sysdeps/ieee754/float128/e_lgammaf128_r.c
 create mode 100644 sysdeps/ieee754/float128/e_log10f128.c
 create mode 100644 sysdeps/ieee754/float128/e_log2f128.c
 create mode 100644 sysdeps/ieee754/float128/e_logf128.c
 create mode 100644 sysdeps/ieee754/float128/e_powf128.c
 create mode 100644 sysdeps/ieee754/float128/e_rem_pio2f128.c
 create mode 100644 sysdeps/ieee754/float128/e_remainderf128.c
 create mode 100644 sysdeps/ieee754/float128/e_scalbf128.c
 create mode 100644 sysdeps/ieee754/float128/e_sinhf128.c
 create mode 100644 sysdeps/ieee754/float128/e_sqrtf128.c
 create mode 100644 sysdeps/ieee754/float128/float128_private.h
 create mode 100644 sysdeps/ieee754/float128/gamma_productf128.c
 create mode 100644 sysdeps/ieee754/float128/ieee754_float128.h
 create mode 100644 sysdeps/ieee754/float128/k_cosf128.c
 create mode 100644 sysdeps/ieee754/float128/k_rem_pio2f128.c
 create mode 100644 sysdeps/ieee754/float128/k_sincosf128.c
 create mode 100644 sysdeps/ieee754/float128/k_sinf128.c
 create mode 100644 sysdeps/ieee754/float128/k_tanf128.c
 create mode 100644 sysdeps/ieee754/float128/lgamma_negf128.c
 create mode 100644 sysdeps/ieee754/float128/lgamma_productf128.c
 create mode 100644 sysdeps/ieee754/float128/s_asinhf128.c
 create mode 100644 sysdeps/ieee754/float128/s_atanf128.c
 create mode 100644 sysdeps/ieee754/float128/s_cbrtf128.c
 create mode 100644 sysdeps/ieee754/float128/s_ceilf128.c
 create mode 100644 sysdeps/ieee754/float128/s_copysignf128.c
 create mode 100644 sysdeps/ieee754/float128/s_cosf128.c
 create mode 100644 sysdeps/ieee754/float128/s_erff128.c
 create mode 100644 sysdeps/ieee754/float128/s_expm1f128.c
 create mode 100644 sysdeps/ieee754/float128/s_fabsf128.c
 create mode 100644 sysdeps/ieee754/float128/s_finitef128.c
 create mode 100644 sysdeps/ieee754/float128/s_floorf128.c
 create mode 100644 sysdeps/ieee754/float128/s_fmaf128.c
 create mode 100644 sysdeps/ieee754/float128/s_fpclassifyf128.c
 create mode 100644 sysdeps/ieee754/float128/s_frexpf128.c
 create mode 100644 sysdeps/ieee754/float128/s_fromfpf128.c
 create mode 100644 sysdeps/ieee754/float128/s_fromfpxf128.c
 create mode 100644 sysdeps/ieee754/float128/s_getpayloadf128.c
 create mode 100644 sysdeps/ieee754/float128/s_isinff128.c
 create mode 100644 sysdeps/ieee754/float128/s_isnanf128.c
 create mode 100644 sysdeps/ieee754/float128/s_issignalingf128.c
 create mode 100644 sysdeps/ieee754/float128/s_llrintf128.c
 create mode 100644 sysdeps/ieee754/float128/s_llroundf128.c
 create mode 100644 sysdeps/ieee754/float128/s_log1pf128.c
 create mode 100644 sysdeps/ieee754/float128/s_logbf128.c
 create mode 100644 sysdeps/ieee754/float128/s_lrintf128.c
 create mode 100644 sysdeps/ieee754/float128/s_lroundf128.c
 create mode 100644 sysdeps/ieee754/float128/s_modff128.c
 create mode 100644 sysdeps/ieee754/float128/s_nearbyintf128.c
 create mode 100644 sysdeps/ieee754/float128/s_nextafterf128.c
 create mode 100644 sysdeps/ieee754/float128/s_nexttowardf128.c
 create mode 100644 sysdeps/ieee754/float128/s_nextupf128.c
 create mode 100644 sysdeps/ieee754/float128/s_remquof128.c
 create mode 100644 sysdeps/ieee754/float128/s_rintf128.c
 create mode 100644 sysdeps/ieee754/float128/s_roundevenf128.c
 create mode 100644 sysdeps/ieee754/float128/s_roundf128.c
 create mode 100644 sysdeps/ieee754/float128/s_scalblnf128.c
 create mode 100644 sysdeps/ieee754/float128/s_scalbnf128.c
 create mode 100644 sysdeps/ieee754/float128/s_setpayloadf128.c
 create mode 100644 sysdeps/ieee754/float128/s_setpayloadsigf128.c
 create mode 100644 sysdeps/ieee754/float128/s_signbitf128.c
 create mode 100644 sysdeps/ieee754/float128/s_significandf128.c
 create mode 100644 sysdeps/ieee754/float128/s_sincosf128.c
 create mode 100644 sysdeps/ieee754/float128/s_sinf128.c
 create mode 100644 sysdeps/ieee754/float128/s_tanf128.c
 create mode 100644 sysdeps/ieee754/float128/s_tanhf128.c
 create mode 100644 sysdeps/ieee754/float128/s_totalorderf128.c
 create mode 100644 sysdeps/ieee754/float128/s_totalordermagf128.c
 create mode 100644 sysdeps/ieee754/float128/s_truncf128.c
 create mode 100644 sysdeps/ieee754/float128/s_ufromfpf128.c
 create mode 100644 sysdeps/ieee754/float128/s_ufromfpxf128.c
 create mode 100644 sysdeps/ieee754/float128/t_sincosf128.c
 create mode 100644 sysdeps/ieee754/float128/x2y2m1f128.c

diff --git a/math/math.h b/math/math.h
index 03aadc0..b960be9 100644
--- a/math/math.h
+++ b/math/math.h
@@ -64,6 +64,9 @@ __BEGIN_DECLS
 #  define SNANL (__builtin_nansl (""))
 # endif
 #endif
+#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+# define SNANF128 (__builtin_nansf128 (""))
+#endif
 
 /* Get __GLIBC_FLT_EVAL_METHOD.  */
 #include <bits/flt-eval-method.h>
diff --git a/math/s_fmaxmag_template.c b/math/s_fmaxmag_template.c
index 6beef03..f7c8248 100644
--- a/math/s_fmaxmag_template.c
+++ b/math/s_fmaxmag_template.c
@@ -17,6 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <math_private.h>
 
 FLOAT
 M_DECL_FUNC (__fmaxmag) (FLOAT x, FLOAT y)
diff --git a/math/s_fminmag_template.c b/math/s_fminmag_template.c
index a1e4c2b..1054c38 100644
--- a/math/s_fminmag_template.c
+++ b/math/s_fminmag_template.c
@@ -17,6 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <math_private.h>
 
 FLOAT
 M_DECL_FUNC (__fminmag) (FLOAT x, FLOAT y)
diff --git a/sysdeps/ieee754/float128/e_acosf128.c b/sysdeps/ieee754/float128/e_acosf128.c
new file mode 100644
index 0000000..7ddf7dc
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_acosf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_acosl.c"
diff --git a/sysdeps/ieee754/float128/e_acoshf128.c b/sysdeps/ieee754/float128/e_acoshf128.c
new file mode 100644
index 0000000..f6dd40c
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_acoshf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_acoshl.c"
diff --git a/sysdeps/ieee754/float128/e_asinf128.c b/sysdeps/ieee754/float128/e_asinf128.c
new file mode 100644
index 0000000..133ab8d
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_asinf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_asinl.c"
diff --git a/sysdeps/ieee754/float128/e_atan2f128.c b/sysdeps/ieee754/float128/e_atan2f128.c
new file mode 100644
index 0000000..9aa740f
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_atan2f128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_atan2l.c"
diff --git a/sysdeps/ieee754/float128/e_atanhf128.c b/sysdeps/ieee754/float128/e_atanhf128.c
new file mode 100644
index 0000000..f26c8d5
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_atanhf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_atanhl.c"
diff --git a/sysdeps/ieee754/float128/e_coshf128.c b/sysdeps/ieee754/float128/e_coshf128.c
new file mode 100644
index 0000000..2abf067
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_coshf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_coshl.c"
diff --git a/sysdeps/ieee754/float128/e_exp10f128.c b/sysdeps/ieee754/float128/e_exp10f128.c
new file mode 100644
index 0000000..b3468d2
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_exp10f128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_exp10l.c"
diff --git a/sysdeps/ieee754/float128/e_exp2f128.c b/sysdeps/ieee754/float128/e_exp2f128.c
new file mode 100644
index 0000000..6411ca7
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_exp2f128.c
@@ -0,0 +1,54 @@
+/* Compute 2^x.
+   Copyright (C) 2017 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 <float128_private.h>
+
+_Float128
+__ieee754_exp2f128 (_Float128 x)
+{
+  if (__glibc_likely (isless (x, (_Float128) FLT128_MAX_EXP)))
+    {
+      if (__builtin_expect (isgreaterequal (x, (_Float128) (FLT128_MIN_EXP
+							    - FLT128_MANT_DIG
+							    - 1)), 1))
+	{
+	  int intx = (int) x;
+	  _Float128 fractx = x - intx;
+	  _Float128 result;
+	  if (fabsf128 (fractx) < FLT128_EPSILON / 4)
+	    result = __scalbnf128 (1 + fractx, intx);
+	  else
+	    result = __scalbnf128 (__ieee754_expf128 (M_LN2f128 * fractx),
+				   intx);
+	  math_check_force_underflow_nonneg (result);
+	  return result;
+	}
+      else
+	{
+	  /* Underflow or exact zero.  */
+	  if (isinf (x))
+	    return 0;
+	  else
+	    return FLT128_MIN * FLT128_MIN;
+	}
+    }
+  else
+    /* Infinity, NaN or overflow.  */
+    return FLT128_MAX * x;
+}
+strong_alias (__ieee754_exp2f128, __exp2f128_finite)
diff --git a/sysdeps/ieee754/float128/e_expf128.c b/sysdeps/ieee754/float128/e_expf128.c
new file mode 100644
index 0000000..b727b17
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_expf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_expl.c"
diff --git a/sysdeps/ieee754/float128/e_fmodf128.c b/sysdeps/ieee754/float128/e_fmodf128.c
new file mode 100644
index 0000000..ed8a749
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_fmodf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_fmodl.c"
diff --git a/sysdeps/ieee754/float128/e_gammaf128_r.c b/sysdeps/ieee754/float128/e_gammaf128_r.c
new file mode 100644
index 0000000..895ac63
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_gammaf128_r.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_gammal_r.c"
diff --git a/sysdeps/ieee754/float128/e_hypotf128.c b/sysdeps/ieee754/float128/e_hypotf128.c
new file mode 100644
index 0000000..1f06555
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_hypotf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_hypotl.c"
diff --git a/sysdeps/ieee754/float128/e_ilogbf128.c b/sysdeps/ieee754/float128/e_ilogbf128.c
new file mode 100644
index 0000000..2861801
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_ilogbf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_ilogbl.c"
diff --git a/sysdeps/ieee754/float128/e_j0f128.c b/sysdeps/ieee754/float128/e_j0f128.c
new file mode 100644
index 0000000..b624b5c
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_j0f128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_j0l.c"
diff --git a/sysdeps/ieee754/float128/e_j1f128.c b/sysdeps/ieee754/float128/e_j1f128.c
new file mode 100644
index 0000000..445428e
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_j1f128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_j1l.c"
diff --git a/sysdeps/ieee754/float128/e_jnf128.c b/sysdeps/ieee754/float128/e_jnf128.c
new file mode 100644
index 0000000..7854e11
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_jnf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_jnl.c"
diff --git a/sysdeps/ieee754/float128/e_lgammaf128.c b/sysdeps/ieee754/float128/e_lgammaf128.c
new file mode 100644
index 0000000..72f02ac
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_lgammaf128.c
@@ -0,0 +1 @@
+/* _FloatN uses tgamma instead.  */
diff --git a/sysdeps/ieee754/float128/e_lgammaf128_r.c b/sysdeps/ieee754/float128/e_lgammaf128_r.c
new file mode 100644
index 0000000..3517ac3
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_lgammaf128_r.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_lgammal_r.c"
diff --git a/sysdeps/ieee754/float128/e_log10f128.c b/sysdeps/ieee754/float128/e_log10f128.c
new file mode 100644
index 0000000..1c3341e
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_log10f128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_log10l.c"
diff --git a/sysdeps/ieee754/float128/e_log2f128.c b/sysdeps/ieee754/float128/e_log2f128.c
new file mode 100644
index 0000000..36becaa
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_log2f128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_log2l.c"
diff --git a/sysdeps/ieee754/float128/e_logf128.c b/sysdeps/ieee754/float128/e_logf128.c
new file mode 100644
index 0000000..b0c9975
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_logf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_logl.c"
diff --git a/sysdeps/ieee754/float128/e_powf128.c b/sysdeps/ieee754/float128/e_powf128.c
new file mode 100644
index 0000000..3afaf7f
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_powf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_powl.c"
diff --git a/sysdeps/ieee754/float128/e_rem_pio2f128.c b/sysdeps/ieee754/float128/e_rem_pio2f128.c
new file mode 100644
index 0000000..86c2ca1
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_rem_pio2f128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_rem_pio2l.c"
diff --git a/sysdeps/ieee754/float128/e_remainderf128.c b/sysdeps/ieee754/float128/e_remainderf128.c
new file mode 100644
index 0000000..90c18f8
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_remainderf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_remainderl.c"
diff --git a/sysdeps/ieee754/float128/e_scalbf128.c b/sysdeps/ieee754/float128/e_scalbf128.c
new file mode 100644
index 0000000..067b724
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_scalbf128.c
@@ -0,0 +1 @@
+/* Not defined for _FloatN types.  */
diff --git a/sysdeps/ieee754/float128/e_sinhf128.c b/sysdeps/ieee754/float128/e_sinhf128.c
new file mode 100644
index 0000000..42a54e0
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_sinhf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/e_sinhl.c"
diff --git a/sysdeps/ieee754/float128/e_sqrtf128.c b/sysdeps/ieee754/float128/e_sqrtf128.c
new file mode 100644
index 0000000..1ac216f
--- /dev/null
+++ b/sysdeps/ieee754/float128/e_sqrtf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include <math/e_sqrtl.c>
diff --git a/sysdeps/ieee754/float128/float128_private.h b/sysdeps/ieee754/float128/float128_private.h
new file mode 100644
index 0000000..9e3f9a0
--- /dev/null
+++ b/sysdeps/ieee754/float128/float128_private.h
@@ -0,0 +1,326 @@
+/* _Float128 overrides for building ldbl-128 as _Float128.
+   Copyright (C) 2017 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/>.  */
+
+/* This must be included before the function renames below.  */
+#include <math.h>
+#undef HUGE_VALL
+#include <math/mul_splitl.h>
+
+/* Renames derived from math_private.h.  */
+#include <math_private.h>
+#include <ieee754_float128.h>
+#define ieee854_long_double_shape_type ieee854_float128_shape_type
+#define ieee854_long_double ieee854_float128
+
+#undef GET_LDOUBLE_LSW64
+#undef GET_LDOUBLE_MSW64
+#undef GET_LDOUBLE_WORDS64
+#undef SET_LDOUBLE_LSW64
+#undef SET_LDOUBLE_MSW64
+#undef SET_LDOUBLE_WORDS64
+#define GET_LDOUBLE_LSW64(x,y) GET_FLOAT128_LSW64 (x, y)
+#define GET_LDOUBLE_MSW64(x,y) GET_FLOAT128_MSW64 (x, y)
+#define GET_LDOUBLE_WORDS64(x,y,z) GET_FLOAT128_WORDS64 (x, y, z)
+#define SET_LDOUBLE_LSW64(x,y) SET_FLOAT128_LSW64 (x, y)
+#define SET_LDOUBLE_MSW64(x,y) SET_FLOAT128_MSW64 (x, y)
+#define SET_LDOUBLE_WORDS64(x,y,z) SET_FLOAT128_WORDS64 (x, y, z)
+
+#undef IEEE854_LONG_DOUBLE_BIAS
+#define IEEE854_LONG_DOUBLE_BIAS IEEE854_FLOAT128_BIAS
+
+#ifdef SET_RESTORE_ROUNDF128
+# undef SET_RESTORE_ROUNDL
+# define SET_RESTORE_ROUNDL() SET_RESTORE_ROUNDF128()
+#endif
+
+
+/* misc macros from the header below.  */
+#include <fix-fp-int-convert-overflow.h>
+#undef FIX_LDBL_LONG_CONVERT_OVERFLOW
+#undef FIX_LDBL_LLONG_CONVERT_OVERFLOW
+#define FIX_LDBL_LONG_CONVERT_OVERFLOW FIX_FLT128_LONG_CONVERT_OVERFLOW
+#define FIX_LDBL_LLONG_CONVERT_OVERFLOW FIX_FLT128_LLONG_CONVERT_OVERFLOW
+
+
+/* float.h constants.  */
+#include <float.h>
+#undef LDBL_DIG
+#undef LDBL_EPSILON
+#undef LDBL_MANT_DIG
+#undef LDBL_MAX
+#undef LDBL_MAX_10_EXP
+#undef LDBL_MAX_EXP
+#undef LDBL_MIN
+#undef LDBL_MIN_10_EXP
+#undef LDBL_MIN_EXP
+#undef LDBL_TRUE_MIN
+#define HUGE_VALL HUGE_VAL_F128
+#define LDBL_DIG FLT128_DIG
+#define LDBL_EPSILON FLT128_EPSILON
+#define LDBL_MANT_DIG FLT128_MANT_DIG
+#define LDBL_MAX FLT128_MAX
+#define LDBL_MAX_10_EXP FLT128_MAX_10_EXP
+#define LDBL_MAX_EXP FLT128_MAX_EXP
+#define LDBL_MIN FLT128_MIN
+#define LDBL_MIN_10_EXP FLT128_MIN_10_EXP
+#define LDBL_MIN_EXP FLT128_MIN_EXP
+#define LDBL_TRUE_MIN FLT128_TRUE_MIN
+
+
+/* math.h GNU constants.  */
+#undef M_El
+#undef M_LOG2El
+#undef M_LOG10El
+#undef M_LN2l
+#undef M_LN10l
+#undef M_PIl
+#undef M_PI_2l
+#undef M_PI_4l
+#undef M_1_PIl
+#undef M_2_PIl
+#undef M_2_SQRTPIl
+#undef M_SQRT2l
+#undef M_SQRT1_2l
+#define M_El M_Ef128
+#define M_LOG2El M_LOG2Ef128
+#define M_LOG10El M_LOG10Ef128
+#define M_LN2l M_LN2f128
+#define M_LN10l M_LN10f128
+#define M_PIl M_PIf128
+#define M_PI_2l M_PI_2f128
+#define M_PI_4l M_PI_4f128
+#define M_1_PIl M_1_PIf128
+#define M_2_PIl M_2_PIf128
+#define M_2_SQRTPIl M_2_SQRTPIf128
+#define M_SQRT2l M_SQRT2f128
+#define M_SQRT1_2l M_SQRT1_2f128
+
+
+/* IEEE function renames.  */
+#define __ieee754_acoshl __ieee754_acoshf128
+#define __ieee754_acosl __ieee754_acosf128
+#define __ieee754_asinhl __ieee754_asinhf128
+#define __ieee754_asinl __ieee754_asinf128
+#define __ieee754_atan2l __ieee754_atan2f128
+#define __ieee754_atanhl __ieee754_atanhf128
+#define __ieee754_coshl __ieee754_coshf128
+#define __ieee754_cosl __ieee754_cosf128
+#define __ieee754_exp10l __ieee754_exp10f128
+#define __ieee754_exp2l __ieee754_exp2f128
+#define __ieee754_expl __ieee754_expf128
+#define __ieee754_fmodl __ieee754_fmodf128
+#define __ieee754_gammal_r __ieee754_gammaf128_r
+#define __ieee754_hypotl __ieee754_hypotf128
+#define __ieee754_ilogbl __ieee754_ilogbf128
+#define __ieee754_j0l __ieee754_j0f128
+#define __ieee754_j1l __ieee754_j1f128
+#define __ieee754_jnl __ieee754_jnf128
+#define __ieee754_lgammal_r __ieee754_lgammaf128_r
+#define __ieee754_log10l __ieee754_log10f128
+#define __ieee754_log2l __ieee754_log2f128
+#define __ieee754_logl __ieee754_logf128
+#define __ieee754_powl __ieee754_powf128
+#define __ieee754_rem_pio2l __ieee754_rem_pio2f128
+#define __ieee754_remainderl __ieee754_remainderf128
+#define __ieee754_sinhl __ieee754_sinhf128
+#define __ieee754_sqrtl __ieee754_sqrtf128
+#define __ieee754_y0l __ieee754_y0f128
+#define __ieee754_y1l __ieee754_y1f128
+#define __ieee754_ynl __ieee754_ynf128
+
+
+/* finite math entry points.  */
+#define __acoshl_finite __acoshf128_finite
+#define __acosl_finite __acosf128_finite
+#define __asinl_finite __asinf128_finite
+#define __atan2l_finite __atan2f128_finite
+#define __atanhl_finite __atanhf128_finite
+#define __coshl_finite __coshf128_finite
+#define __cosl_finite __cosf128_finite
+#define __exp10l_finite __exp10f128_finite
+#define __exp2l_finite __exp2f128_finite
+#define __expl_finite __expf128_finite
+#define __fmodl_finite __fmodf128_finite
+#define __hypotl_finite __hypotf128_finite
+#define __ilogbl_finite __ilogbf128_finite
+#define __j0l_finite __j0f128_finite
+#define __j1l_finite __j1f128_finite
+#define __jnl_finite __jnf128_finite
+#define __lgammal_r_finite __lgammaf128_r_finite
+#define __log10l_finite __log10f128_finite
+#define __log2l_finite __log2f128_finite
+#define __logl_finite __logf128_finite
+#define __powl_finite __powf128_finite
+#define __remainderl_finite __remainderf128_finite
+#define __sinhl_finite __sinhf128_finite
+#define __y0l_finite __y0f128_finite
+#define __y1l_finite __y1f128_finite
+#define __ynl_finite __ynf128_finite
+
+
+/* internal function names.  */
+#define __asinhl __asinhf128
+#define __atanl __atanf128
+#define __cbrtl __cbrtf128
+#define __ceill __ceilf128
+#define __copysignl __copysignf128
+#define __cosl __cosf128
+#define __erfcl __erfcf128
+#define __erfl __erff128
+#define __expl __expf128
+#define __expm1l __expm1f128
+#define __fabsl __fabsf128
+#define __fdiml __fdimf128
+#define __finitel __finitef128
+#define __floorl __floorf128
+#define __fmal __fmaf128
+#define __fmaxl __fmaxf128
+#define __fminl __fminf128
+#define __fpclassifyl __fpclassifyf128
+#define __frexpl __frexpf128
+#define __gammal_r_finite __gammaf128_r_finite
+#define __isinfl __isinff128
+#define __isnanl __isnanf128
+#define __issignalingl __issignalingf128
+#define __ldexpl __ldexpf128
+#define __llrintl __llrintf128
+#define __llroundl __llroundf128
+#define __log1pl __log1pf128
+#define __logbl __logbf128
+#define __logl __logf128
+#define __lrintl __lrintf128
+#define __lroundl __lroundf128
+#define __modfl __modff128
+#define __nearbyintl __nearbyintf128
+#define __nextafterl __nextafterf128
+#define __nextdownl __nextdownf128
+#define __nextupl __nextupf128
+#define __remquol __remquof128
+#define __rintl __rintf128
+#define __roundl __roundf128
+#define __scalblnl __scalblnf128
+#define __scalbnl __scalbnf128
+#define __signbitl __signbitf128
+#define __sincosl __sincosf128
+#define __sinl __sinf128
+#define __sqrtl __sqrtf128
+#define __tanhl __tanhf128
+#define __tanl __tanf128
+#define __truncl __truncf128
+#define __x2y2m1l __x2y2m1f128
+
+/* __nexttowardf128 is not _Float128 API. */
+#define __nexttowardl __nexttowardf128_do_not_use
+#define nexttowardl nexttowardf128_do_not_use
+
+
+/* public entry points.  */
+#define asinhl asinhf128
+#define atanl atanf128
+#define cbrtl cbrtf128
+#define ceill ceilf128
+#define copysignl copysignf128
+#define cosl cosf128
+#define erfcl erfcf128
+#define erfl erff128
+#define expl expf128
+#define expm1l expm1f128
+#define fabsl fabsf128
+#define fdiml fdimf128
+#define finitel finitef128_do_not_use
+#define floorl floorf128
+#define fmal fmaf128
+#define fmaxl fmaxf128
+#define fminl fminf128
+#define frexpl frexpf128
+#define gammal_r_finite gammaf128_r_finite
+#define getpayloadl getpayloadf128
+#define isinfl isinff128_do_not_use
+#define isnanl isnanf128_do_not_use
+#define ldexpl ldexpf128
+#define llrintl llrintf128
+#define llroundl llroundf128
+#define log1pl log1pf128
+#define logbl logbf128
+#define logl logf128
+#define lrintl lrintf128
+#define lroundl lroundf128
+#define modfl modff128
+#define nanl nanf128
+#define nearbyintl nearbyintf128
+#define nextafterl nextafterf128
+#define nextdownl nextdownf128
+#define nextupl nextupf128
+#define remquol remquof128
+#define rintl rintf128
+#define roundevenl roundevenf128
+#define roundl roundf128
+#define scalbnl scalbnf128
+#define signbitl signbitf128_do_not_use
+#define sincosl sincosf128
+#define sinl sinf128
+#define sqrtl sqrtf128
+#define tanhl tanhf128
+#define tanl tanf128
+#define totalorderl totalorderf128
+#define totalordermagl totalordermagf128
+#define truncl truncf128
+
+
+/* misc internal renames.  */
+#define __builtin_fmal __builtin_fmaf128
+#define __expl_table __expf128_table
+#define __gamma_productl __gamma_productf128
+#define __kernel_cosl __kernel_cosf128
+#define __kernel_rem_pio2l __kernel_rem_pio2f128
+#define __kernel_sincosl __kernel_sincosf128
+#define __kernel_sinl __kernel_sinf128
+#define __kernel_tanl __kernel_tanf128
+#define __lgamma_negl __lgamma_negf128
+#define __lgamma_productl __lgamma_productf128
+#define __sincosl_table __sincosf128_table
+#define mul_splitl mul_splitf128
+
+/* Builtin renames.  */
+#define __builtin_copysignl __builtin_copysignf128
+#define __builtin_signbitl __builtin_signbit
+
+/* Get the constant suffix from bits/floatn-compat.h.  */
+#define L __f128
+
+static inline void
+mul_splitf128 (_Float128 *hi, _Float128 *lo, _Float128 x, _Float128 y)
+{
+#ifdef __FP_FAST_FMAF128
+  /* Fast built-in fused multiply-add.  */
+  *hi = x * y;
+  *lo = __builtin_fmal (x, y, -*hi);
+#else
+  /* Apply Dekker's algorithm.  */
+  *hi = x * y;
+# define C ((1LL << (FLT128_MANT_DIG + 1) / 2) + 1)
+  _Float128 x1 = x * C;
+  _Float128 y1 = y * C;
+# undef C
+  x1 = (x - x1) + x1;
+  y1 = (y - y1) + y1;
+  _Float128 x2 = x - x1;
+  _Float128 y2 = y - y1;
+  *lo = (((x1 * y1 - *hi) + x1 * y2) + x2 * y1) + x2 * y2;
+#endif
+}
diff --git a/sysdeps/ieee754/float128/gamma_productf128.c b/sysdeps/ieee754/float128/gamma_productf128.c
new file mode 100644
index 0000000..be2271f
--- /dev/null
+++ b/sysdeps/ieee754/float128/gamma_productf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/gamma_productl.c"
diff --git a/sysdeps/ieee754/float128/ieee754_float128.h b/sysdeps/ieee754/float128/ieee754_float128.h
new file mode 100644
index 0000000..e8e7211
--- /dev/null
+++ b/sysdeps/ieee754/float128/ieee754_float128.h
@@ -0,0 +1,140 @@
+/* _Float128 IEEE like macros.
+   Copyright (C) 2017 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 _IEEE754_FLOAT128_H
+#define _IEEE754_FLOAT128_H
+
+#include <endian.h>
+#include <stdint.h>
+
+# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+#  define __FLT_EORDER2(t, a, b) t a; t b;
+#  define __FLT_EORDER4(t, a, b, c, d) \
+			t a; t b; t c; t d;
+#  define __FLT_EORDER6(t, a, b, c, d, e, f)  \
+			t a; t b; t c; t d; t e; t f;
+#  define __FLT_EORDER7(t, a, b, c, d, e, f, g)  \
+			t a; t b; t c; t d; t e; t f; t g;
+# else
+#  define __FLT_EORDER2(t, a, b) \
+			t b; t a;
+#  define __FLT_EORDER4(t, a, b, c, d) \
+			t d; t c; t b; t a;
+#  define __FLT_EORDER6(t, a, b, c, d, e, f)  \
+			t f; t e; t d; t c; t b; t a;
+#  define __FLT_EORDER7(t, a, b, c, d, e, f, g)  \
+			t g; t f; t e; t d; t c; t b; t a;
+# endif
+
+/* A union which permits us to convert between _Float128 and
+   four 32 bit ints or two 64 bit ints.  */
+
+typedef union
+{
+  _Float128 value;
+  struct
+  {
+    __FLT_EORDER2 (uint64_t, msw, lsw);
+  } parts64;
+  struct
+  {
+    __FLT_EORDER4 (uint32_t, w0, w1, w2, w3);
+  } parts32;
+} ieee854_float128_shape_type;
+
+/* Get two 64 bit ints from a _Float128.  */
+
+# define GET_FLOAT128_WORDS64(ix0,ix1,d)			\
+do {								\
+  ieee854_float128_shape_type qw_u;				\
+  qw_u.value = (d);						\
+  (ix0) = qw_u.parts64.msw;					\
+  (ix1) = qw_u.parts64.lsw;					\
+} while (0)
+
+/* Set a _Float128 from two 64 bit ints.  */
+
+# define SET_FLOAT128_WORDS64(d,ix0,ix1)			\
+do {								\
+  ieee854_float128_shape_type qw_u;				\
+  qw_u.parts64.msw = (ix0);					\
+  qw_u.parts64.lsw = (ix1);					\
+  (d) = qw_u.value;						\
+} while (0)
+
+/* Get the more significant 64 bits of a _Float128 mantissa.  */
+
+# define GET_FLOAT128_MSW64(v,d)				\
+do {								\
+  ieee854_float128_shape_type sh_u;				\
+  sh_u.value = (d);						\
+  (v) = sh_u.parts64.msw;					\
+} while (0)
+
+/* Set the more significant 64 bits of a _Float128 mantissa from an int.  */
+
+# define SET_FLOAT128_MSW64(d,v)				\
+do {								\
+  ieee854_float128_shape_type sh_u;				\
+  sh_u.value = (d);						\
+  sh_u.parts64.msw = (v);					\
+  (d) = sh_u.value;						\
+} while (0)
+
+/* Get the least significant 64 bits of a _Float128 mantissa.  */
+
+# define GET_FLOAT128_LSW64(v,d)				\
+do {								\
+  ieee854_float128_shape_type sh_u;				\
+  sh_u.value = (d);						\
+  (v) = sh_u.parts64.lsw;					\
+} while (0)
+
+/* Likewise, some helper macros which are exposed via ieee754.h for
+   C99 real types, but not _Float128.  */
+
+union ieee854_float128
+  {
+    _Float128 d;
+
+    /* This is the IEEE 854 quad-precision format.  */
+    struct
+      {
+	__FLT_EORDER6 (unsigned int, negative:1,
+				     exponent:15,
+				     mantissa0:16,
+				     mantissa1:32,
+				     mantissa2:32,
+				     mantissa3:32)
+      } ieee;
+
+    /* This format makes it easier to see if a NaN is a signalling NaN.  */
+    struct
+      {
+	__FLT_EORDER7 (unsigned int, negative:1,
+				     exponent:15,
+				     quiet_nan:1,
+				     mantissa0:15,
+				     mantissa1:32,
+				     mantissa2:32,
+				     mantissa3:32)
+      } ieee_nan;
+  };
+
+#define IEEE854_FLOAT128_BIAS 0x3fff /* Added to exponent.  */
+
+#endif
diff --git a/sysdeps/ieee754/float128/k_cosf128.c b/sysdeps/ieee754/float128/k_cosf128.c
new file mode 100644
index 0000000..9db0906
--- /dev/null
+++ b/sysdeps/ieee754/float128/k_cosf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/k_cosl.c"
diff --git a/sysdeps/ieee754/float128/k_rem_pio2f128.c b/sysdeps/ieee754/float128/k_rem_pio2f128.c
new file mode 100644
index 0000000..5140266
--- /dev/null
+++ b/sysdeps/ieee754/float128/k_rem_pio2f128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include <math/k_rem_pio2l.c>
diff --git a/sysdeps/ieee754/float128/k_sincosf128.c b/sysdeps/ieee754/float128/k_sincosf128.c
new file mode 100644
index 0000000..14c0f1e
--- /dev/null
+++ b/sysdeps/ieee754/float128/k_sincosf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/k_sincosl.c"
diff --git a/sysdeps/ieee754/float128/k_sinf128.c b/sysdeps/ieee754/float128/k_sinf128.c
new file mode 100644
index 0000000..f3acf1c
--- /dev/null
+++ b/sysdeps/ieee754/float128/k_sinf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/k_sinl.c"
diff --git a/sysdeps/ieee754/float128/k_tanf128.c b/sysdeps/ieee754/float128/k_tanf128.c
new file mode 100644
index 0000000..ca6be53
--- /dev/null
+++ b/sysdeps/ieee754/float128/k_tanf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/k_tanl.c"
diff --git a/sysdeps/ieee754/float128/lgamma_negf128.c b/sysdeps/ieee754/float128/lgamma_negf128.c
new file mode 100644
index 0000000..9c16f93
--- /dev/null
+++ b/sysdeps/ieee754/float128/lgamma_negf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/lgamma_negl.c"
diff --git a/sysdeps/ieee754/float128/lgamma_productf128.c b/sysdeps/ieee754/float128/lgamma_productf128.c
new file mode 100644
index 0000000..5efe5dd
--- /dev/null
+++ b/sysdeps/ieee754/float128/lgamma_productf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/lgamma_productl.c"
diff --git a/sysdeps/ieee754/float128/s_asinhf128.c b/sysdeps/ieee754/float128/s_asinhf128.c
new file mode 100644
index 0000000..7b93d8c
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_asinhf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_asinhl.c"
diff --git a/sysdeps/ieee754/float128/s_atanf128.c b/sysdeps/ieee754/float128/s_atanf128.c
new file mode 100644
index 0000000..9b4d7ec
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_atanf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_atanl.c"
diff --git a/sysdeps/ieee754/float128/s_cbrtf128.c b/sysdeps/ieee754/float128/s_cbrtf128.c
new file mode 100644
index 0000000..3bd5797
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_cbrtf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_cbrtl.c"
diff --git a/sysdeps/ieee754/float128/s_ceilf128.c b/sysdeps/ieee754/float128/s_ceilf128.c
new file mode 100644
index 0000000..0af15f5
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_ceilf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_ceill.c"
diff --git a/sysdeps/ieee754/float128/s_copysignf128.c b/sysdeps/ieee754/float128/s_copysignf128.c
new file mode 100644
index 0000000..808f7ab
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_copysignf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_copysignl.c"
diff --git a/sysdeps/ieee754/float128/s_cosf128.c b/sysdeps/ieee754/float128/s_cosf128.c
new file mode 100644
index 0000000..8ba5526
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_cosf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_cosl.c"
diff --git a/sysdeps/ieee754/float128/s_erff128.c b/sysdeps/ieee754/float128/s_erff128.c
new file mode 100644
index 0000000..ac16ad6
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_erff128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_erfl.c"
diff --git a/sysdeps/ieee754/float128/s_expm1f128.c b/sysdeps/ieee754/float128/s_expm1f128.c
new file mode 100644
index 0000000..ea28d89
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_expm1f128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_expm1l.c"
diff --git a/sysdeps/ieee754/float128/s_fabsf128.c b/sysdeps/ieee754/float128/s_fabsf128.c
new file mode 100644
index 0000000..79ba47c
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_fabsf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_fabsl.c"
diff --git a/sysdeps/ieee754/float128/s_finitef128.c b/sysdeps/ieee754/float128/s_finitef128.c
new file mode 100644
index 0000000..801de88
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_finitef128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_finitel.c"
diff --git a/sysdeps/ieee754/float128/s_floorf128.c b/sysdeps/ieee754/float128/s_floorf128.c
new file mode 100644
index 0000000..1829843
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_floorf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_floorl.c"
diff --git a/sysdeps/ieee754/float128/s_fmaf128.c b/sysdeps/ieee754/float128/s_fmaf128.c
new file mode 100644
index 0000000..6497895
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_fmaf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_fmal.c"
diff --git a/sysdeps/ieee754/float128/s_fpclassifyf128.c b/sysdeps/ieee754/float128/s_fpclassifyf128.c
new file mode 100644
index 0000000..15131dc
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_fpclassifyf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_fpclassifyl.c"
diff --git a/sysdeps/ieee754/float128/s_frexpf128.c b/sysdeps/ieee754/float128/s_frexpf128.c
new file mode 100644
index 0000000..7b040b3
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_frexpf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_frexpl.c"
diff --git a/sysdeps/ieee754/float128/s_fromfpf128.c b/sysdeps/ieee754/float128/s_fromfpf128.c
new file mode 100644
index 0000000..891de3d
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_fromfpf128.c
@@ -0,0 +1,5 @@
+#define UNSIGNED 0
+#define INEXACT 0
+#define FUNC fromfpf128
+#include <float128_private.h>
+#include "../ldbl-128/s_fromfpl_main.c"
diff --git a/sysdeps/ieee754/float128/s_fromfpxf128.c b/sysdeps/ieee754/float128/s_fromfpxf128.c
new file mode 100644
index 0000000..21676fa
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_fromfpxf128.c
@@ -0,0 +1,5 @@
+#define UNSIGNED 0
+#define INEXACT 1
+#define FUNC fromfpxf128
+#include <float128_private.h>
+#include "../ldbl-128/s_fromfpl_main.c"
diff --git a/sysdeps/ieee754/float128/s_getpayloadf128.c b/sysdeps/ieee754/float128/s_getpayloadf128.c
new file mode 100644
index 0000000..2e2607a
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_getpayloadf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_getpayloadl.c"
diff --git a/sysdeps/ieee754/float128/s_isinff128.c b/sysdeps/ieee754/float128/s_isinff128.c
new file mode 100644
index 0000000..62cc424
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_isinff128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_isinfl.c"
diff --git a/sysdeps/ieee754/float128/s_isnanf128.c b/sysdeps/ieee754/float128/s_isnanf128.c
new file mode 100644
index 0000000..efba240
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_isnanf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_isnanl.c"
diff --git a/sysdeps/ieee754/float128/s_issignalingf128.c b/sysdeps/ieee754/float128/s_issignalingf128.c
new file mode 100644
index 0000000..1d45995
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_issignalingf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_issignalingl.c"
diff --git a/sysdeps/ieee754/float128/s_llrintf128.c b/sysdeps/ieee754/float128/s_llrintf128.c
new file mode 100644
index 0000000..bb9ca58
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_llrintf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_llrintl.c"
diff --git a/sysdeps/ieee754/float128/s_llroundf128.c b/sysdeps/ieee754/float128/s_llroundf128.c
new file mode 100644
index 0000000..be54a90
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_llroundf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_llroundl.c"
diff --git a/sysdeps/ieee754/float128/s_log1pf128.c b/sysdeps/ieee754/float128/s_log1pf128.c
new file mode 100644
index 0000000..48bb84f
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_log1pf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_log1pl.c"
diff --git a/sysdeps/ieee754/float128/s_logbf128.c b/sysdeps/ieee754/float128/s_logbf128.c
new file mode 100644
index 0000000..167384a
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_logbf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_logbl.c"
diff --git a/sysdeps/ieee754/float128/s_lrintf128.c b/sysdeps/ieee754/float128/s_lrintf128.c
new file mode 100644
index 0000000..1cfa9d7
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_lrintf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_lrintl.c"
diff --git a/sysdeps/ieee754/float128/s_lroundf128.c b/sysdeps/ieee754/float128/s_lroundf128.c
new file mode 100644
index 0000000..13ba9f2
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_lroundf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_lroundl.c"
diff --git a/sysdeps/ieee754/float128/s_modff128.c b/sysdeps/ieee754/float128/s_modff128.c
new file mode 100644
index 0000000..4618c6c
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_modff128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_modfl.c"
diff --git a/sysdeps/ieee754/float128/s_nearbyintf128.c b/sysdeps/ieee754/float128/s_nearbyintf128.c
new file mode 100644
index 0000000..e61a3b3
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_nearbyintf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_nearbyintl.c"
diff --git a/sysdeps/ieee754/float128/s_nextafterf128.c b/sysdeps/ieee754/float128/s_nextafterf128.c
new file mode 100644
index 0000000..2c43a00
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_nextafterf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_nextafterl.c"
diff --git a/sysdeps/ieee754/float128/s_nexttowardf128.c b/sysdeps/ieee754/float128/s_nexttowardf128.c
new file mode 100644
index 0000000..006e4c9
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_nexttowardf128.c
@@ -0,0 +1 @@
+/* This function does not exist for _FloatN types.  */
diff --git a/sysdeps/ieee754/float128/s_nextupf128.c b/sysdeps/ieee754/float128/s_nextupf128.c
new file mode 100644
index 0000000..7d5d0b8
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_nextupf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_nextupl.c"
diff --git a/sysdeps/ieee754/float128/s_remquof128.c b/sysdeps/ieee754/float128/s_remquof128.c
new file mode 100644
index 0000000..1cef61a
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_remquof128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_remquol.c"
diff --git a/sysdeps/ieee754/float128/s_rintf128.c b/sysdeps/ieee754/float128/s_rintf128.c
new file mode 100644
index 0000000..2adb95f
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_rintf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_rintl.c"
diff --git a/sysdeps/ieee754/float128/s_roundevenf128.c b/sysdeps/ieee754/float128/s_roundevenf128.c
new file mode 100644
index 0000000..5a9b3f3
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_roundevenf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_roundevenl.c"
diff --git a/sysdeps/ieee754/float128/s_roundf128.c b/sysdeps/ieee754/float128/s_roundf128.c
new file mode 100644
index 0000000..1eb36f2
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_roundf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_roundl.c"
diff --git a/sysdeps/ieee754/float128/s_scalblnf128.c b/sysdeps/ieee754/float128/s_scalblnf128.c
new file mode 100644
index 0000000..999223c
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_scalblnf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_scalblnl.c"
diff --git a/sysdeps/ieee754/float128/s_scalbnf128.c b/sysdeps/ieee754/float128/s_scalbnf128.c
new file mode 100644
index 0000000..0e7ab26
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_scalbnf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_scalbnl.c"
diff --git a/sysdeps/ieee754/float128/s_setpayloadf128.c b/sysdeps/ieee754/float128/s_setpayloadf128.c
new file mode 100644
index 0000000..63e046a
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_setpayloadf128.c
@@ -0,0 +1,4 @@
+#include <float128_private.h>
+#define SIG 0
+#define FUNC setpayloadf128
+#include "../ldbl-128/s_setpayloadl_main.c"
diff --git a/sysdeps/ieee754/float128/s_setpayloadsigf128.c b/sysdeps/ieee754/float128/s_setpayloadsigf128.c
new file mode 100644
index 0000000..85b2c4a
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_setpayloadsigf128.c
@@ -0,0 +1,4 @@
+#include <float128_private.h>
+#define SIG 1
+#define FUNC setpayloadsigf128
+#include "../ldbl-128/s_setpayloadl_main.c"
diff --git a/sysdeps/ieee754/float128/s_signbitf128.c b/sysdeps/ieee754/float128/s_signbitf128.c
new file mode 100644
index 0000000..71c1ca3
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_signbitf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_signbitl.c"
diff --git a/sysdeps/ieee754/float128/s_significandf128.c b/sysdeps/ieee754/float128/s_significandf128.c
new file mode 100644
index 0000000..067b724
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_significandf128.c
@@ -0,0 +1 @@
+/* Not defined for _FloatN types.  */
diff --git a/sysdeps/ieee754/float128/s_sincosf128.c b/sysdeps/ieee754/float128/s_sincosf128.c
new file mode 100644
index 0000000..472adde
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_sincosf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_sincosl.c"
diff --git a/sysdeps/ieee754/float128/s_sinf128.c b/sysdeps/ieee754/float128/s_sinf128.c
new file mode 100644
index 0000000..d79a116
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_sinf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_sinl.c"
diff --git a/sysdeps/ieee754/float128/s_tanf128.c b/sysdeps/ieee754/float128/s_tanf128.c
new file mode 100644
index 0000000..382961a
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_tanf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_tanl.c"
diff --git a/sysdeps/ieee754/float128/s_tanhf128.c b/sysdeps/ieee754/float128/s_tanhf128.c
new file mode 100644
index 0000000..e02c9a6
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_tanhf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_tanhl.c"
diff --git a/sysdeps/ieee754/float128/s_totalorderf128.c b/sysdeps/ieee754/float128/s_totalorderf128.c
new file mode 100644
index 0000000..1b115d8
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_totalorderf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_totalorderl.c"
diff --git a/sysdeps/ieee754/float128/s_totalordermagf128.c b/sysdeps/ieee754/float128/s_totalordermagf128.c
new file mode 100644
index 0000000..e44c657
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_totalordermagf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_totalordermagl.c"
diff --git a/sysdeps/ieee754/float128/s_truncf128.c b/sysdeps/ieee754/float128/s_truncf128.c
new file mode 100644
index 0000000..474d9dc
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_truncf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_truncl.c"
diff --git a/sysdeps/ieee754/float128/s_ufromfpf128.c b/sysdeps/ieee754/float128/s_ufromfpf128.c
new file mode 100644
index 0000000..0cd2281
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_ufromfpf128.c
@@ -0,0 +1,5 @@
+#define UNSIGNED 1
+#define INEXACT 0
+#define FUNC ufromfpf128
+#include <float128_private.h>
+#include "../ldbl-128/s_fromfpl_main.c"
diff --git a/sysdeps/ieee754/float128/s_ufromfpxf128.c b/sysdeps/ieee754/float128/s_ufromfpxf128.c
new file mode 100644
index 0000000..c0cd7e3
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_ufromfpxf128.c
@@ -0,0 +1,5 @@
+#define UNSIGNED 1
+#define INEXACT 1
+#define FUNC ufromfpxf128
+#include <float128_private.h>
+#include "../ldbl-128/s_fromfpl_main.c"
diff --git a/sysdeps/ieee754/float128/t_sincosf128.c b/sysdeps/ieee754/float128/t_sincosf128.c
new file mode 100644
index 0000000..7e699d3
--- /dev/null
+++ b/sysdeps/ieee754/float128/t_sincosf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/t_sincosl.c"
diff --git a/sysdeps/ieee754/float128/x2y2m1f128.c b/sysdeps/ieee754/float128/x2y2m1f128.c
new file mode 100644
index 0000000..6888079
--- /dev/null
+++ b/sysdeps/ieee754/float128/x2y2m1f128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/x2y2m1l.c"
diff --git a/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h b/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
index 198234c..7ddb368 100644
--- a/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
+++ b/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
@@ -27,6 +27,9 @@ extern int __iscanonicall (long double __x)
      __THROW __attribute__ ((__const__));
 # define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
 # define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
+# if __HAVE_DISTINCT_FLOAT128
+#  define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1)
+# endif
 
 /* Return nonzero value if X is canonical.  In IEEE interchange binary
    formats, all values are canonical, but the argument must still be
-- 
2.4.11

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v4 0/5] Add float128 functions and declarations to libm
@ 2017-05-11 20:53 Gabriel F. T. Gomes
  2017-05-11 20:53 ` [PATCH v4 1/5] float128: Add public _Float128 " Gabriel F. T. Gomes
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Gabriel F. T. Gomes @ 2017-05-11 20:53 UTC (permalink / raw)
  To: libc-alpha

Changes since v3 in each patch in this series.

Gabriel F. T. Gomes (2):
  float128: Include math-finite.h for _Float128
  float128: Enable use of IEEE wrapper templates

Paul E. Murphy (3):
  float128: Add public _Float128 declarations to libm.
  float128: Add private _Float128 declarations for libm.
  float128: Add wrappers to override ldbl-128 as float128.

 bits/floatn.h                                  |  35 +++
 bits/huge_val_flt128.h                         |  23 ++
 bits/libm-simd-decl-stubs.h                    |   6 +
 include/complex.h                              |   3 +
 include/float.h                                |  31 +++
 include/math.h                                 |  13 +
 math/Makefile                                  |   3 +-
 math/bits/cmathcalls.h                         |   4 +-
 math/bits/math-finite.h                        |  13 +-
 math/bits/mathcalls.h                          |  36 ++-
 math/complex.h                                 |  27 +-
 math/math.h                                    |  89 ++++++-
 math/s_fmaxmag_template.c                      |   1 +
 math/s_fminmag_template.c                      |   1 +
 sysdeps/generic/fix-fp-int-convert-overflow.h  |   2 +
 sysdeps/generic/math-type-macros-float128.h    |  42 ++++
 sysdeps/generic/math_private.h                 |  51 +++-
 sysdeps/generic/math_private_calls.h           |   4 +-
 sysdeps/ieee754/float128/e_acosf128.c          |   2 +
 sysdeps/ieee754/float128/e_acoshf128.c         |   2 +
 sysdeps/ieee754/float128/e_asinf128.c          |   2 +
 sysdeps/ieee754/float128/e_atan2f128.c         |   2 +
 sysdeps/ieee754/float128/e_atanhf128.c         |   2 +
 sysdeps/ieee754/float128/e_coshf128.c          |   2 +
 sysdeps/ieee754/float128/e_exp10f128.c         |   2 +
 sysdeps/ieee754/float128/e_exp2f128.c          |  54 ++++
 sysdeps/ieee754/float128/e_expf128.c           |   2 +
 sysdeps/ieee754/float128/e_fmodf128.c          |   2 +
 sysdeps/ieee754/float128/e_gammaf128_r.c       |   2 +
 sysdeps/ieee754/float128/e_hypotf128.c         |   2 +
 sysdeps/ieee754/float128/e_ilogbf128.c         |   2 +
 sysdeps/ieee754/float128/e_j0f128.c            |   2 +
 sysdeps/ieee754/float128/e_j1f128.c            |   2 +
 sysdeps/ieee754/float128/e_jnf128.c            |   2 +
 sysdeps/ieee754/float128/e_lgammaf128.c        |   1 +
 sysdeps/ieee754/float128/e_lgammaf128_r.c      |   2 +
 sysdeps/ieee754/float128/e_log10f128.c         |   2 +
 sysdeps/ieee754/float128/e_log2f128.c          |   2 +
 sysdeps/ieee754/float128/e_logf128.c           |   2 +
 sysdeps/ieee754/float128/e_powf128.c           |   2 +
 sysdeps/ieee754/float128/e_rem_pio2f128.c      |   2 +
 sysdeps/ieee754/float128/e_remainderf128.c     |   2 +
 sysdeps/ieee754/float128/e_scalbf128.c         |   1 +
 sysdeps/ieee754/float128/e_sinhf128.c          |   2 +
 sysdeps/ieee754/float128/e_sqrtf128.c          |   2 +
 sysdeps/ieee754/float128/float128_private.h    | 326 +++++++++++++++++++++++++
 sysdeps/ieee754/float128/gamma_productf128.c   |   2 +
 sysdeps/ieee754/float128/ieee754_float128.h    | 140 +++++++++++
 sysdeps/ieee754/float128/k_cosf128.c           |   2 +
 sysdeps/ieee754/float128/k_rem_pio2f128.c      |   2 +
 sysdeps/ieee754/float128/k_sincosf128.c        |   2 +
 sysdeps/ieee754/float128/k_sinf128.c           |   2 +
 sysdeps/ieee754/float128/k_tanf128.c           |   2 +
 sysdeps/ieee754/float128/lgamma_negf128.c      |   2 +
 sysdeps/ieee754/float128/lgamma_productf128.c  |   2 +
 sysdeps/ieee754/float128/s_asinhf128.c         |   2 +
 sysdeps/ieee754/float128/s_atanf128.c          |   2 +
 sysdeps/ieee754/float128/s_cbrtf128.c          |   2 +
 sysdeps/ieee754/float128/s_ceilf128.c          |   2 +
 sysdeps/ieee754/float128/s_copysignf128.c      |   2 +
 sysdeps/ieee754/float128/s_cosf128.c           |   2 +
 sysdeps/ieee754/float128/s_erff128.c           |   2 +
 sysdeps/ieee754/float128/s_expm1f128.c         |   2 +
 sysdeps/ieee754/float128/s_fabsf128.c          |   2 +
 sysdeps/ieee754/float128/s_finitef128.c        |   2 +
 sysdeps/ieee754/float128/s_floorf128.c         |   2 +
 sysdeps/ieee754/float128/s_fmaf128.c           |   2 +
 sysdeps/ieee754/float128/s_fpclassifyf128.c    |   2 +
 sysdeps/ieee754/float128/s_frexpf128.c         |   2 +
 sysdeps/ieee754/float128/s_fromfpf128.c        |   5 +
 sysdeps/ieee754/float128/s_fromfpxf128.c       |   5 +
 sysdeps/ieee754/float128/s_getpayloadf128.c    |   2 +
 sysdeps/ieee754/float128/s_isinff128.c         |   2 +
 sysdeps/ieee754/float128/s_isnanf128.c         |   2 +
 sysdeps/ieee754/float128/s_issignalingf128.c   |   2 +
 sysdeps/ieee754/float128/s_llrintf128.c        |   2 +
 sysdeps/ieee754/float128/s_llroundf128.c       |   2 +
 sysdeps/ieee754/float128/s_log1pf128.c         |   2 +
 sysdeps/ieee754/float128/s_logbf128.c          |   2 +
 sysdeps/ieee754/float128/s_lrintf128.c         |   2 +
 sysdeps/ieee754/float128/s_lroundf128.c        |   2 +
 sysdeps/ieee754/float128/s_modff128.c          |   2 +
 sysdeps/ieee754/float128/s_nearbyintf128.c     |   2 +
 sysdeps/ieee754/float128/s_nextafterf128.c     |   2 +
 sysdeps/ieee754/float128/s_nexttowardf128.c    |   1 +
 sysdeps/ieee754/float128/s_nextupf128.c        |   2 +
 sysdeps/ieee754/float128/s_remquof128.c        |   2 +
 sysdeps/ieee754/float128/s_rintf128.c          |   2 +
 sysdeps/ieee754/float128/s_roundevenf128.c     |   2 +
 sysdeps/ieee754/float128/s_roundf128.c         |   2 +
 sysdeps/ieee754/float128/s_scalblnf128.c       |   2 +
 sysdeps/ieee754/float128/s_scalbnf128.c        |   2 +
 sysdeps/ieee754/float128/s_setpayloadf128.c    |   4 +
 sysdeps/ieee754/float128/s_setpayloadsigf128.c |   4 +
 sysdeps/ieee754/float128/s_signbitf128.c       |   2 +
 sysdeps/ieee754/float128/s_significandf128.c   |   1 +
 sysdeps/ieee754/float128/s_sincosf128.c        |   2 +
 sysdeps/ieee754/float128/s_sinf128.c           |   2 +
 sysdeps/ieee754/float128/s_tanf128.c           |   2 +
 sysdeps/ieee754/float128/s_tanhf128.c          |   2 +
 sysdeps/ieee754/float128/s_totalorderf128.c    |   2 +
 sysdeps/ieee754/float128/s_totalordermagf128.c |   2 +
 sysdeps/ieee754/float128/s_truncf128.c         |   2 +
 sysdeps/ieee754/float128/s_ufromfpf128.c       |   5 +
 sysdeps/ieee754/float128/s_ufromfpxf128.c      |   5 +
 sysdeps/ieee754/float128/t_sincosf128.c        |   2 +
 sysdeps/ieee754/float128/x2y2m1f128.c          |   2 +
 sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h |   3 +
 sysdeps/ieee754/ldbl-opt/s_sin.c               |   1 +
 109 files changed, 1066 insertions(+), 26 deletions(-)
 create mode 100644 bits/floatn.h
 create mode 100644 bits/huge_val_flt128.h
 create mode 100644 include/float.h
 create mode 100644 sysdeps/generic/math-type-macros-float128.h
 create mode 100644 sysdeps/ieee754/float128/e_acosf128.c
 create mode 100644 sysdeps/ieee754/float128/e_acoshf128.c
 create mode 100644 sysdeps/ieee754/float128/e_asinf128.c
 create mode 100644 sysdeps/ieee754/float128/e_atan2f128.c
 create mode 100644 sysdeps/ieee754/float128/e_atanhf128.c
 create mode 100644 sysdeps/ieee754/float128/e_coshf128.c
 create mode 100644 sysdeps/ieee754/float128/e_exp10f128.c
 create mode 100644 sysdeps/ieee754/float128/e_exp2f128.c
 create mode 100644 sysdeps/ieee754/float128/e_expf128.c
 create mode 100644 sysdeps/ieee754/float128/e_fmodf128.c
 create mode 100644 sysdeps/ieee754/float128/e_gammaf128_r.c
 create mode 100644 sysdeps/ieee754/float128/e_hypotf128.c
 create mode 100644 sysdeps/ieee754/float128/e_ilogbf128.c
 create mode 100644 sysdeps/ieee754/float128/e_j0f128.c
 create mode 100644 sysdeps/ieee754/float128/e_j1f128.c
 create mode 100644 sysdeps/ieee754/float128/e_jnf128.c
 create mode 100644 sysdeps/ieee754/float128/e_lgammaf128.c
 create mode 100644 sysdeps/ieee754/float128/e_lgammaf128_r.c
 create mode 100644 sysdeps/ieee754/float128/e_log10f128.c
 create mode 100644 sysdeps/ieee754/float128/e_log2f128.c
 create mode 100644 sysdeps/ieee754/float128/e_logf128.c
 create mode 100644 sysdeps/ieee754/float128/e_powf128.c
 create mode 100644 sysdeps/ieee754/float128/e_rem_pio2f128.c
 create mode 100644 sysdeps/ieee754/float128/e_remainderf128.c
 create mode 100644 sysdeps/ieee754/float128/e_scalbf128.c
 create mode 100644 sysdeps/ieee754/float128/e_sinhf128.c
 create mode 100644 sysdeps/ieee754/float128/e_sqrtf128.c
 create mode 100644 sysdeps/ieee754/float128/float128_private.h
 create mode 100644 sysdeps/ieee754/float128/gamma_productf128.c
 create mode 100644 sysdeps/ieee754/float128/ieee754_float128.h
 create mode 100644 sysdeps/ieee754/float128/k_cosf128.c
 create mode 100644 sysdeps/ieee754/float128/k_rem_pio2f128.c
 create mode 100644 sysdeps/ieee754/float128/k_sincosf128.c
 create mode 100644 sysdeps/ieee754/float128/k_sinf128.c
 create mode 100644 sysdeps/ieee754/float128/k_tanf128.c
 create mode 100644 sysdeps/ieee754/float128/lgamma_negf128.c
 create mode 100644 sysdeps/ieee754/float128/lgamma_productf128.c
 create mode 100644 sysdeps/ieee754/float128/s_asinhf128.c
 create mode 100644 sysdeps/ieee754/float128/s_atanf128.c
 create mode 100644 sysdeps/ieee754/float128/s_cbrtf128.c
 create mode 100644 sysdeps/ieee754/float128/s_ceilf128.c
 create mode 100644 sysdeps/ieee754/float128/s_copysignf128.c
 create mode 100644 sysdeps/ieee754/float128/s_cosf128.c
 create mode 100644 sysdeps/ieee754/float128/s_erff128.c
 create mode 100644 sysdeps/ieee754/float128/s_expm1f128.c
 create mode 100644 sysdeps/ieee754/float128/s_fabsf128.c
 create mode 100644 sysdeps/ieee754/float128/s_finitef128.c
 create mode 100644 sysdeps/ieee754/float128/s_floorf128.c
 create mode 100644 sysdeps/ieee754/float128/s_fmaf128.c
 create mode 100644 sysdeps/ieee754/float128/s_fpclassifyf128.c
 create mode 100644 sysdeps/ieee754/float128/s_frexpf128.c
 create mode 100644 sysdeps/ieee754/float128/s_fromfpf128.c
 create mode 100644 sysdeps/ieee754/float128/s_fromfpxf128.c
 create mode 100644 sysdeps/ieee754/float128/s_getpayloadf128.c
 create mode 100644 sysdeps/ieee754/float128/s_isinff128.c
 create mode 100644 sysdeps/ieee754/float128/s_isnanf128.c
 create mode 100644 sysdeps/ieee754/float128/s_issignalingf128.c
 create mode 100644 sysdeps/ieee754/float128/s_llrintf128.c
 create mode 100644 sysdeps/ieee754/float128/s_llroundf128.c
 create mode 100644 sysdeps/ieee754/float128/s_log1pf128.c
 create mode 100644 sysdeps/ieee754/float128/s_logbf128.c
 create mode 100644 sysdeps/ieee754/float128/s_lrintf128.c
 create mode 100644 sysdeps/ieee754/float128/s_lroundf128.c
 create mode 100644 sysdeps/ieee754/float128/s_modff128.c
 create mode 100644 sysdeps/ieee754/float128/s_nearbyintf128.c
 create mode 100644 sysdeps/ieee754/float128/s_nextafterf128.c
 create mode 100644 sysdeps/ieee754/float128/s_nexttowardf128.c
 create mode 100644 sysdeps/ieee754/float128/s_nextupf128.c
 create mode 100644 sysdeps/ieee754/float128/s_remquof128.c
 create mode 100644 sysdeps/ieee754/float128/s_rintf128.c
 create mode 100644 sysdeps/ieee754/float128/s_roundevenf128.c
 create mode 100644 sysdeps/ieee754/float128/s_roundf128.c
 create mode 100644 sysdeps/ieee754/float128/s_scalblnf128.c
 create mode 100644 sysdeps/ieee754/float128/s_scalbnf128.c
 create mode 100644 sysdeps/ieee754/float128/s_setpayloadf128.c
 create mode 100644 sysdeps/ieee754/float128/s_setpayloadsigf128.c
 create mode 100644 sysdeps/ieee754/float128/s_signbitf128.c
 create mode 100644 sysdeps/ieee754/float128/s_significandf128.c
 create mode 100644 sysdeps/ieee754/float128/s_sincosf128.c
 create mode 100644 sysdeps/ieee754/float128/s_sinf128.c
 create mode 100644 sysdeps/ieee754/float128/s_tanf128.c
 create mode 100644 sysdeps/ieee754/float128/s_tanhf128.c
 create mode 100644 sysdeps/ieee754/float128/s_totalorderf128.c
 create mode 100644 sysdeps/ieee754/float128/s_totalordermagf128.c
 create mode 100644 sysdeps/ieee754/float128/s_truncf128.c
 create mode 100644 sysdeps/ieee754/float128/s_ufromfpf128.c
 create mode 100644 sysdeps/ieee754/float128/s_ufromfpxf128.c
 create mode 100644 sysdeps/ieee754/float128/t_sincosf128.c
 create mode 100644 sysdeps/ieee754/float128/x2y2m1f128.c

-- 
2.4.11

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 1/5] float128: Add public _Float128 declarations to libm.
  2017-05-11 20:53 ` [PATCH v4 1/5] float128: Add public _Float128 " Gabriel F. T. Gomes
@ 2017-05-12 14:52   ` Joseph Myers
  2017-05-15 14:21     ` Gabriel F. T. Gomes
  0 siblings, 1 reply; 16+ messages in thread
From: Joseph Myers @ 2017-05-12 14:52 UTC (permalink / raw)
  To: Gabriel F. T. Gomes; +Cc: libc-alpha

On Thu, 11 May 2017, Gabriel F. T. Gomes wrote:

> 	* math/mathcalls.h (drem): Only define if __MATH_DECLARING_FLOATN.
> 	(gamma): Likewise.
> 	(nexttoward): Likewise.
> 	(significand): Likewise.
> 	(pow10): Likewise.
> 	(scalb): Likewise.
> 	(finite): Likewise.
> 	(isinf): Likewise.
> 	(isnan): Likewise.

That's if *not* __MATH_DECLARING_FLOATN.

> 	* math/math.h (__MATH_DECLARING_FLOATN): New macro to control

Your ChangeLog entry for math.h doesn't seem to mention e.g. the inclusion 
of <bits/floatn.h> or <bits/huge_val_flt128.h>.  Please review all the 
ChangeLog entries against the actual patch (once the code fixes listed 
here are done).

> 	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
> 	(M_Ef128): New _GNU_SOURCE enabled macro.

No, the code is correct here and the ChangeLog entry is wrong; the 
condition #if __HAVE_FLOAT128 && defined __USE_GNU in the code on these 
macros is the correct one for them.

> +#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
> +# ifndef _Mfloat128_
> +#  define _Mfloat128_		_Float128
> +# endif
> +/* GCC < 7 requires extra convincing to expose a complex float128 type.  */
> +# ifdef __CFLOAT128
> +#  undef _Mdouble_complex_
> +#  define _Mdouble_complex_	__CFLOAT128
> +# endif
> +# define _Mdouble_		_Mfloat128_
> +# define __MATH_PRECNAME(name)	name##f128
> +# include <bits/cmathcalls.h>

The condition for including bits/cmathcalls.h should match that for 
including bits/mathcalls.h.  That is, __GLIBC_USE (IEC_60559_TYPES_EXT) && 
(__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) (or 
something logically equivalent).

>  /* Return nonzero value if X is positive or negative infinity.  */
> -# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
> +# if __HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7,0) \
> +     && !defined __SUPPORT_SNAN__
> +   /* __builtin_isinf_sign is broken for float128 only before GCC 7.0.  */
> +#  define isinf(x) \
> +    (__builtin_types_compatible_p (typeof (x), _Float128) \
> +     ? __isinff128 (x) : __builtin_isinf_sign (x))
> +# elif __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__

You need to use __typeof or __typeof__ here, not typeof, to be 
namespace-clean.

OK with those changes.

Note on libm header omissions from this patch, included or expected in 
subsequent patches:

In subsequent patches in the present series: math-finite.h and related 
changes; SNANF128.

Expected in a subsequent patch series as part of completing enabling 
_Float128 support: a definition of __MATH_TG for the 
__HAVE_DISTINCT_FLOAT128 case; tgmath.h support.

Not needed in the initial support: anything to do with FP_FAST_FMAF128.  
(GCC 7 does not have built-in fmaf128 etc. or define __FP_FAST_FMAF128 
etc.; that's not part of the minimal set of built-in functions for all 
floating-point types.  FP_FAST_FMAF128 would presumably be true for POWER9 
if you add a POWER9 version of fmaf128 that uses the xsmaddqp instruction, 
which ought to be faster than the software version of fmaf128, but of 
course that's not needed in the initial support.)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 2/5] float128: Include math-finite.h for _Float128
  2017-05-11 20:53 ` [PATCH v4 2/5] float128: Include math-finite.h for _Float128 Gabriel F. T. Gomes
@ 2017-05-12 14:56   ` Joseph Myers
  0 siblings, 0 replies; 16+ messages in thread
From: Joseph Myers @ 2017-05-12 14:56 UTC (permalink / raw)
  To: Gabriel F. T. Gomes; +Cc: libc-alpha

On Thu, 11 May 2017, Gabriel F. T. Gomes wrote:

> +/* Include bits/math-finite.h for float128.  */
> +# if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)

As with bits/cmathcalls.h, the condition should match that for 
bits/mathcalls.h, so __GLIBC_USE (IEC_60559_TYPES_EXT) && 
(__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) or 
equivalent.

OK with that change.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 3/5] float128: Add private _Float128 declarations for libm.
  2017-05-11 20:53 ` [PATCH v4 3/5] float128: Add private _Float128 declarations for libm Gabriel F. T. Gomes
@ 2017-05-12 15:06   ` Joseph Myers
  0 siblings, 0 replies; 16+ messages in thread
From: Joseph Myers @ 2017-05-12 15:06 UTC (permalink / raw)
  To: Gabriel F. T. Gomes; +Cc: libc-alpha

On Thu, 11 May 2017, Gabriel F. T. Gomes wrote:

> 	* include/complex.h (__kernel_casinhf128): New declaration.
> 	* include/float.h: New file.
> 	* include/math.h (__finitef128): Add a hidden def.
> 	(__isinff128): Likewise.
> 	(__isnanf128): Likewise.
> 	(__fpclassify): Likewise.
> 	(__issignalling): Likewise.
> 	(__expf128): Likewise.
> 	(__expm1f128): Likewise.
> 
> 	* sysdeps/generic/fix-fp-int-convert-overflow.h:
> 	(FIX_FLT128_LONG_CONVERT_OVERFLOW): New macro.
> 	(FIX_FLT128_LLONG_CONVERT_OVERFLOW): Likewise.
> 
> 	* sysdeps/generic/math-type-macros-float128.h: New file.
> 
> 	* sysdeps/generic/math_private.h: Include math_private_calls.h
> 	for _Float128.
> 	(__isinff128): New inline implementation used when GCC < 7.0,
> 	since in this case __builtin_isinf_sign is broken.
> 	(fabsf128): New inline implementation that calls the builtin.
> 	(__EXPR_FLT128): New macro.
> 	(min_of_type): Optionally include _Float128 types too.
> 
> 	* sysdeps/generic/math_private_calls.h (__kernel_sincos):
> 	Declare for _Float128.
> 	(__kernel_rem_pio2): Likewise.
> 
> 	* sysdeps/ieee754/ldbl-opt/s_sin.c:
> 	(__DECL_SIMD_sincos_disablef128): New macro.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 4/5] float128: Enable use of IEEE wrapper templates
  2017-05-11 20:53 ` [PATCH v4 4/5] float128: Enable use of IEEE wrapper templates Gabriel F. T. Gomes
@ 2017-05-12 15:06   ` Joseph Myers
  2017-05-15 14:23     ` Gabriel F. T. Gomes
  0 siblings, 1 reply; 16+ messages in thread
From: Joseph Myers @ 2017-05-12 15:06 UTC (permalink / raw)
  To: Gabriel F. T. Gomes; +Cc: libc-alpha

On Thu, 11 May 2017, Gabriel F. T. Gomes wrote:

> 2017-02-01  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
> 
> 	* sysdeps/generic/math-type-macros-float128.h
> 	(__USE_WRAPPER_TEMPLATE): Define to 1 to enable use of the
> 	wrapper templates.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 5/5] float128: Add wrappers to override ldbl-128 as float128.
  2017-05-11 20:53 ` [PATCH v4 5/5] float128: Add wrappers to override ldbl-128 as float128 Gabriel F. T. Gomes
@ 2017-05-12 16:10   ` Joseph Myers
  2017-05-12 16:32     ` Joseph Myers
  0 siblings, 1 reply; 16+ messages in thread
From: Joseph Myers @ 2017-05-12 16:10 UTC (permalink / raw)
  To: Gabriel F. T. Gomes; +Cc: libc-alpha

On Thu, 11 May 2017, Gabriel F. T. Gomes wrote:

> diff --git a/sysdeps/ieee754/float128/e_lgammaf128.c b/sysdeps/ieee754/float128/e_lgammaf128.c
> new file mode 100644
> index 0000000..72f02ac
> --- /dev/null
> +++ b/sysdeps/ieee754/float128/e_lgammaf128.c
> @@ -0,0 +1 @@
> +/* _FloatN uses tgamma instead.  */

No, _FloatN has tgammaf128, lgammaf128 and lgammaf128_r, but not plain 
gammaf128.  This file should be removed; nothing should use it.  Plain 
lgammaf128 for _Float128 should come from the type-generic template 
w_lgamma_template.c, without this patch needing to do anything special for 
it.

> diff --git a/sysdeps/ieee754/float128/e_sqrtf128.c b/sysdeps/ieee754/float128/e_sqrtf128.c
> new file mode 100644
> index 0000000..1ac216f
> --- /dev/null
> +++ b/sysdeps/ieee754/float128/e_sqrtf128.c
> @@ -0,0 +1,2 @@
> +#include <float128_private.h>
> +#include <math/e_sqrtl.c>

That won't achieve the desired effects, in that the stub implementation 
will still reference __ieee754_sqrtl in the error message printed.  I 
think the obvious thing to do is to replicate the stub file with 
appropriate substitutions in it as e_sqrtf128.c.  (While there really 
ought to be a shared soft-fp implementation of sqrt for binary128, and 
AArch64 and MIPS64 have essentially the same one, putting it in the 
sysdeps directory is problematic because such an implementation only works 
when sfp-machine.h is available.)

> +#define signbitl signbitf128_do_not_use

signbitl doesn't exist as a public interface; there should be no need for 
this #define.

> +/* Get the constant suffix from bits/floatn-compat.h.  */
> +#define L __f128

I think this should be defined as a function-like macro rather than 
affecting any object-like use of L.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 5/5] float128: Add wrappers to override ldbl-128 as float128.
  2017-05-12 16:10   ` Joseph Myers
@ 2017-05-12 16:32     ` Joseph Myers
  2017-05-16 19:16       ` [PATCH] Convert e_exp2l.c into a template Gabriel F. T. Gomes
  0 siblings, 1 reply; 16+ messages in thread
From: Joseph Myers @ 2017-05-12 16:32 UTC (permalink / raw)
  To: Gabriel F. T. Gomes; +Cc: libc-alpha

Also: why duplicate math/e_exp2l.c with substitutions as e_exp2f128.c, 
when I'd think it's cleaner to convert e_exp2l.c to a type-generic 
template e_exp2_template.c (making sure that sysdeps e_exp2* files 
continue to be used instead of the template where available, but my 
understanding of the template machinery is that should happen 
automatically)?

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 1/5] float128: Add public _Float128 declarations to libm.
  2017-05-12 14:52   ` Joseph Myers
@ 2017-05-15 14:21     ` Gabriel F. T. Gomes
  0 siblings, 0 replies; 16+ messages in thread
From: Gabriel F. T. Gomes @ 2017-05-15 14:21 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

On Fri, 12 May 2017 14:52:05 +0000
Joseph Myers <joseph@codesourcery.com> wrote:

> On Thu, 11 May 2017, Gabriel F. T. Gomes wrote:
> 
> > 	* math/mathcalls.h (drem): Only define if __MATH_DECLARING_FLOATN.
> > 	(gamma): Likewise.
> > 	(nexttoward): Likewise.
> > 	(significand): Likewise.
> > 	(pow10): Likewise.
> > 	(scalb): Likewise.
> > 	(finite): Likewise.
> > 	(isinf): Likewise.
> > 	(isnan): Likewise.  
> 
> That's if *not* __MATH_DECLARING_FLOATN.
> 
> > 	* math/math.h (__MATH_DECLARING_FLOATN): New macro to control  
> 
> Your ChangeLog entry for math.h doesn't seem to mention e.g. the inclusion 
> of <bits/floatn.h> or <bits/huge_val_flt128.h>.  Please review all the 
> ChangeLog entries against the actual patch (once the code fixes listed 
> here are done).
> 
> > 	[__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
> > 	(M_Ef128): New _GNU_SOURCE enabled macro.  
> 
> No, the code is correct here and the ChangeLog entry is wrong; the 
> condition #if __HAVE_FLOAT128 && defined __USE_GNU in the code on these 
> macros is the correct one for them.
> 
> > +#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
> > +# ifndef _Mfloat128_
> > +#  define _Mfloat128_		_Float128
> > +# endif
> > +/* GCC < 7 requires extra convincing to expose a complex float128 type.  */
> > +# ifdef __CFLOAT128
> > +#  undef _Mdouble_complex_
> > +#  define _Mdouble_complex_	__CFLOAT128
> > +# endif
> > +# define _Mdouble_		_Mfloat128_
> > +# define __MATH_PRECNAME(name)	name##f128
> > +# include <bits/cmathcalls.h>  
> 
> The condition for including bits/cmathcalls.h should match that for 
> including bits/mathcalls.h.  That is, __GLIBC_USE (IEC_60559_TYPES_EXT) && 
> (__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) (or 
> something logically equivalent).
> 
> >  /* Return nonzero value if X is positive or negative infinity.  */
> > -# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
> > +# if __HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7,0) \
> > +     && !defined __SUPPORT_SNAN__
> > +   /* __builtin_isinf_sign is broken for float128 only before GCC 7.0.  */
> > +#  define isinf(x) \
> > +    (__builtin_types_compatible_p (typeof (x), _Float128) \
> > +     ? __isinff128 (x) : __builtin_isinf_sign (x))
> > +# elif __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__  
> 
> You need to use __typeof or __typeof__ here, not typeof, to be 
> namespace-clean.
> 
> OK with those changes.

Thanks.  Pushed with the changes as fcee5905d341.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 4/5] float128: Enable use of IEEE wrapper templates
  2017-05-12 15:06   ` Joseph Myers
@ 2017-05-15 14:23     ` Gabriel F. T. Gomes
  0 siblings, 0 replies; 16+ messages in thread
From: Gabriel F. T. Gomes @ 2017-05-15 14:23 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

On Fri, 12 May 2017 15:06:47 +0000
Joseph Myers <joseph@codesourcery.com> wrote:

> On Thu, 11 May 2017, Gabriel F. T. Gomes wrote:
> 
> > 2017-02-01  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
> > 
> > 	* sysdeps/generic/math-type-macros-float128.h
> > 	(__USE_WRAPPER_TEMPLATE): Define to 1 to enable use of the
> > 	wrapper templates.  
> 
> OK.
> 

Thanks.  Patches 1 to 4 in this series are now committed.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] Convert e_exp2l.c into a template
  2017-05-12 16:32     ` Joseph Myers
@ 2017-05-16 19:16       ` Gabriel F. T. Gomes
  2017-05-16 20:43         ` Joseph Myers
  0 siblings, 1 reply; 16+ messages in thread
From: Gabriel F. T. Gomes @ 2017-05-16 19:16 UTC (permalink / raw)
  To: libc-alpha

This patch converts the implementation of exp2l in math/e_exp2l.c into
a template in math/e_exp2_template.c, then adjusts Makefile to use
this template for long double (the implementations for float and
double in sysdeps have higher precedence and are not used).  This
template can also be used for float128, thus reducing the amount of
duplicated code that gets added when adding support the new type.

Tested for powerpc64le and s390x.

2017-05-16  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>

	* math/Makefile (libm-calls): Move e_exp2F to gen-libm-calls.
	(gen-libm-calls): Add e_exp2F to use the template.
	* math/e_exp2l.c: Rename to math/e_exp2_template.c.
	* math/e_exp2_template.c: New file, renamed from
	math/e_exp2l.c, and made into a template.
---
 math/Makefile                         |  4 ++--
 math/{e_exp2l.c => e_exp2_template.c} | 40 +++++++++++++++++++++++------------
 2 files changed, 28 insertions(+), 16 deletions(-)
 rename math/{e_exp2l.c => e_exp2_template.c} (56%)

diff --git a/math/Makefile b/math/Makefile
index ff4aa00..9aca4e0 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -59,7 +59,7 @@ gen-libm-calls = cargF conjF cimagF crealF cabsF s_cacosF		  \
 		 w_acoshF w_asinF w_atan2F w_atanhF w_coshF w_exp10F	  \
 		 w_exp2F w_fmodF w_hypotF w_j0F w_j1F w_jnF w_logF	  \
 		 w_log10F w_log2F w_powF w_remainderF w_sinhF w_sqrtF	  \
-		 w_tgammaF w_lgammaF w_lgammaF_r w_expF
+		 w_tgammaF w_lgammaF w_lgammaF_r w_expF e_exp2F
 
 libm-calls =								  \
 	e_acosF e_acoshF e_asinF e_atan2F e_atanhF e_coshF e_expF e_fmodF \
@@ -72,7 +72,7 @@ libm-calls =								  \
 	s_nextafterF s_nexttowardF s_rintF s_scalblnF			  \
 	s_significandF s_sinF s_tanF s_tanhF				  \
 	s_fpclassifyF s_truncF						  \
-	s_remquoF e_log2F e_exp2F s_roundF s_nearbyintF s_sincosF	  \
+	s_remquoF e_log2F s_roundF s_nearbyintF s_sincosF		  \
 	s_fmaF s_lrintF s_llrintF s_lroundF s_llroundF e_exp10F		  \
 	s_issignalingF $(calls:s_%=m_%) x2y2m1F				  \
 	gamma_productF lgamma_negF lgamma_productF			  \
diff --git a/math/e_exp2l.c b/math/e_exp2_template.c
similarity index 56%
rename from math/e_exp2l.c
rename to math/e_exp2_template.c
index bd68e62..85b138c 100644
--- a/math/e_exp2l.c
+++ b/math/e_exp2_template.c
@@ -27,22 +27,34 @@
 # define LDBL_EPSILON 0x1p-106L
 #endif
 
-long double
-__ieee754_exp2l (long double x)
+#define M_PRE_X(prefix, x) prefix ## _ ## x
+#define M_PRE_S(prefix, x) M_PRE_X (prefix, x)
+#define M_PRE(x) M_PRE_S (M_PFX, x)
+
+#define declare_mgen_finite_alias_x(from, to) \
+	strong_alias (from, to ## _finite)
+#define declare_mgen_finite_alias_s(from,to) \
+	declare_mgen_finite_alias_x (from, to)
+#define declare_mgen_finite_alias(from, to) \
+	declare_mgen_finite_alias_s (M_SUF (from), M_SUF (to))
+
+FLOAT
+M_DECL_FUNC (__ieee754_exp2) (FLOAT x)
 {
-  if (__glibc_likely (isless (x, (long double) LDBL_MAX_EXP)))
+  if (__glibc_likely (isless (x, (FLOAT) M_PRE (MAX_EXP))))
     {
-      if (__builtin_expect (isgreaterequal (x, (long double) (LDBL_MIN_EXP
-							      - LDBL_MANT_DIG
-							      - 1)), 1))
+      if (__builtin_expect (isgreaterequal (x, (FLOAT) (M_PRE (MIN_EXP)
+							- M_PRE (MANT_DIG)
+							- 1)), 1))
 	{
 	  int intx = (int) x;
-	  long double fractx = x - intx;
-	  long double result;
-	  if (fabsl (fractx) < LDBL_EPSILON / 4.0L)
-	    result = __scalbnl (1.0L + fractx, intx);
+	  FLOAT fractx = x - intx;
+	  FLOAT result;
+	  if (M_SUF (fabs) (fractx) < M_PRE (EPSILON) / M_LIT (4.0))
+	    result = M_SUF (__scalbn) (M_LIT (1.0) + fractx, intx);
 	  else
-	    result = __scalbnl (__ieee754_expl (M_LN2l * fractx), intx);
+	    result = M_SUF (__scalbn) (M_SUF (__ieee754_exp) (M_SUF (M_LN2)
+							      * fractx), intx);
 	  math_check_force_underflow_nonneg (result);
 	  return result;
 	}
@@ -52,11 +64,11 @@ __ieee754_exp2l (long double x)
 	  if (isinf (x))
 	    return 0;
 	  else
-	    return LDBL_MIN * LDBL_MIN;
+	    return M_PRE (MIN) * M_PRE (MIN);
 	}
     }
   else
     /* Infinity, NaN or overflow.  */
-    return LDBL_MAX * x;
+    return M_PRE (MAX) * x;
 }
-strong_alias (__ieee754_exp2l, __exp2l_finite)
+declare_mgen_finite_alias (__ieee754_exp2, __exp2)
-- 
2.4.11

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Convert e_exp2l.c into a template
  2017-05-16 19:16       ` [PATCH] Convert e_exp2l.c into a template Gabriel F. T. Gomes
@ 2017-05-16 20:43         ` Joseph Myers
  0 siblings, 0 replies; 16+ messages in thread
From: Joseph Myers @ 2017-05-16 20:43 UTC (permalink / raw)
  To: Gabriel F. T. Gomes; +Cc: libc-alpha

On Tue, 16 May 2017, Gabriel F. T. Gomes wrote:

>  # define LDBL_EPSILON 0x1p-106L
>  #endif

This should be removed, as the definition of M_EPSILON in 
sysdeps/generic/math-type-macros.h handles it.

> +#define M_PRE_X(prefix, x) prefix ## _ ## x
> +#define M_PRE_S(prefix, x) M_PRE_X (prefix, x)
> +#define M_PRE(x) M_PRE_S (M_PFX, x)

This should not be needed.  Just use M_MAX_EXP, M_MANT_DIG, etc. (adding 
new macros such as M_MIN_EXP to sysdeps/generic/math-type-macros.h as 
needed).

> +	  FLOAT fractx = x - intx;
> +	  FLOAT result;
> +	  if (M_SUF (fabs) (fractx) < M_PRE (EPSILON) / M_LIT (4.0))
> +	    result = M_SUF (__scalbn) (M_LIT (1.0) + fractx, intx);

And I think it's best just to use integers 4 and 1 here, as in other 
templates, and rely on implicit conversions, to make the code less 
verbose.

> -	    result = __scalbnl (__ieee754_expl (M_LN2l * fractx), intx);
> +	    result = M_SUF (__scalbn) (M_SUF (__ieee754_exp) (M_SUF (M_LN2)
> +							      * fractx), intx);

Use M_EXP and M_SCALBN, since they exist.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-05-16 20:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 20:53 [PATCH v4 0/5] Add float128 functions and declarations to libm Gabriel F. T. Gomes
2017-05-11 20:53 ` [PATCH v4 1/5] float128: Add public _Float128 " Gabriel F. T. Gomes
2017-05-12 14:52   ` Joseph Myers
2017-05-15 14:21     ` Gabriel F. T. Gomes
2017-05-11 20:53 ` [PATCH v4 2/5] float128: Include math-finite.h for _Float128 Gabriel F. T. Gomes
2017-05-12 14:56   ` Joseph Myers
2017-05-11 20:53 ` [PATCH v4 3/5] float128: Add private _Float128 declarations for libm Gabriel F. T. Gomes
2017-05-12 15:06   ` Joseph Myers
2017-05-11 20:53 ` [PATCH v4 5/5] float128: Add wrappers to override ldbl-128 as float128 Gabriel F. T. Gomes
2017-05-12 16:10   ` Joseph Myers
2017-05-12 16:32     ` Joseph Myers
2017-05-16 19:16       ` [PATCH] Convert e_exp2l.c into a template Gabriel F. T. Gomes
2017-05-16 20:43         ` Joseph Myers
2017-05-11 20:53 ` [PATCH v4 4/5] float128: Enable use of IEEE wrapper templates Gabriel F. T. Gomes
2017-05-12 15:06   ` Joseph Myers
2017-05-15 14:23     ` Gabriel F. T. Gomes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).