Commit Graph

3 Commits

Author SHA1 Message Date
Gabriel F. T. Gomes 9f0170af26 Include libc-header-start.h in include/float.h
The file include/float.h uses the macro __GLIBC_USE to test for TS 18661-3
support.  Such macro is provided by bits/libc-header-start.h, so include it
to get the definition.

Tested for powerpc64le and s390x.

	* include/float.h: Include libc-header-start.h to get the
	definition of __GLIBC_USE.
2017-06-23 10:30:04 -03:00
Gabriel F. T. Gomes 8fd3101431 Allow macros prefixed with FLT128 in include/float.h
TS 18661-3 specifies that macros prefixed with FLTN_ can be defined in
float.h, only if __STDC_WANT_IEC_60559_TYPES_EXT__ is defined as a macro
before the inclusion of float.h.  Since GCC 7.0, these macros are provided
under this condition, however, for older versions of GCC, these macros are
not provided at all.  This patch allows the definitions of such macros in
include/float.h for older compilers, if the condition above is met, and
even if _ISOMAC is defined.

	* include/float.h: Allow the definition of macros prefixed with
	FLT128 even if _ISOMAC is defined, but provided that
	__STDC_WANT_IEC_60559_TYPES_EXT__ is defined as a macro.
2017-06-12 14:48:53 -03:00
Paul E. Murphy 81f26b53b5 float128: Add private _Float128 declarations for libm.
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 bits/floatn.h and
	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.
2017-05-15 10:23:28 -03:00