Commit Graph

9 Commits

Author SHA1 Message Date
Joseph Myers 04277e02d7 Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2019-01-01 00:11:28 +00:00
Joseph Myers 688903eb3e Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2018-01-01 00:32:25 +00:00
Joseph Myers 58c4a1612d Handle more _FloatN, _FloatNx types in type-generic strtod tests.
Continuing the preparation for additional _FloatN / _FloatNx type
support, this patch adds support to type-generic strtod tests.
GEN_STRTOD_TEST_FOREACH and STRTOD_TEST_FOREACH are made to handle the
full set of such types.  tst-strtod-round-skeleton.c is updated for
those types it can handle without needing changes to the generator
(i.e. those types that have already-handled formats).

Tested for x86_64.

	* stdlib/tst-strtod.h (F16): New macro.
	(F32): Likewise.
	(F64): Likewise.
	(F32X): Likewise.
	(F64X): Likewise.
	(F128X): Likewise.
	(IF_FLOAT16): Likewise.
	(IF_FLOAT32): Likewise.
	(IF_FLOAT64): Likewise.
	(IF_FLOAT32X): Likewise.
	(IF_FLOAT64X): Likewise.
	(IF_FLOAT128X): Likewise.
	(GEN_TEST_STRTOD_FOREACH): Conditionally call macros for _Float16,
	_Float32, _Float64, _Float32x, _Float64x and _Float128x.
	(STRTOD_TEST_FOREACH): Likewise.
	* stdlib/tst-strtod-round-skeleton.c (CHOOSE_f32): New macro.
	(CHOOSE_f64): Likewise.
	(CHOOSE_f32x): Likewise.
	(CHOOSE_f64x): Likewise.
2017-11-07 18:08:44 +00:00
Gabriel F. T. Gomes 5ae2266943 Provide an additional macro expansion for F128 in stdlib/tst-strtod.h
The macro F128 in stdlib/tst-strtod.h is defined to provide the literal
suffix for _Float128 constants.  It uses the macro __f128 (), which is
defined in bits/floatn.h to provide the correct literal suffix depending on
what is provided by the compiler.

However, F128 was not being expanded and only worked correctly, when
compiling with GCC 7 (or greater), since F128 is the literal suffix itself.
This patch adds an additional macro expansion so that the macro F128
expands to the correct literal suffix on older compilers.

	* stdlib/tst-strtod.h (MMFUNC): New macro to provide an addition
	macro expansion.
	(GEN_TEST_STRTOD_FOREACH): Use MMFUNC for _Float128.
2017-06-22 13:04:56 -03:00
Paul E. Murphy 45f39d4588 float128: Add strtof128, wcstof128, and related functions.
The implementations are contained with sysdeps/ieee754/float128 as
they are only built when _Float128 is enabled within libc/m.

	* include/gmp.h (__mpn_construct_float128): New declaration.
	* include/stdlib.h: Include bits/floatn.h for _Float128 tests.
	(__strtof128_l): New declaration.
	(__strtof128_nan): Likewise.
	(__wcstof128_nan): Likewise.
	(__strtof128_internal): Likewise.
	(____strtof128_l_internal): Likewise.
	* include/wchar.h: Include bits/floatn.h for _Float128 tests.
	(__wcstof128_l): New declaration.
	(__wcstof128_internal): Likewise.

	* stdlib/Makefile (bug-strtod2): Link libm too.

	* stdlib/stdlib.h (strtof128): New declaration.
	(strtof128_l): Likewise.

	* stdlib/tst-strtod-nan-locale-main.c: Updated to use
	tst-strtod.h macros to ensure float128 gets tested too.

	* stdlib/tst-strtod-round-skeleton.c (CHOOSE_f128): New macro.

	* stdlib/tst-strtod.h: Include bits/floatn.h for _Float128
	tests.
	(IF_FLOAT128): New macro.
	(GEN_TEST_STRTOD): Update to optionally include _Float128 in
	the tests.
	(STRTOD_TEST_FOREACH): Likewise.

	* sysdeps/ieee754/float128/Makefile: Insert new strtof128 and
	wcstof128 functions into libc.

	* sysdeps/ieee754/float128/Versions: Add exports for the above
	new functions.

	* sysdeps/ieee754/float128/mpn2float128.c: New file.
	* sysdeps/ieee754/float128/strtod_nan_float128.h: New file.
	* sysdeps/ieee754/float128/strtof128.c: New file.
	* sysdeps/ieee754/float128/strtof128_l.c: New file.
	* sysdeps/ieee754/float128/strtof128_nan.c: New file.
	* sysdeps/ieee754/float128/wcstof128.c: New file.
	* sysdeps/ieee754/float128/wcstof128_l.c: New file.
	* sysdeps/ieee754/float128/wcstof128_nan.c: New fike.
	* wcsmbs/Makefile: (CFLAGS-wcstof128.c): Append strtox-CFLAGS.
	(CFLAGS-wcstof128_l): Likewise.

	* wcsmbs/wchar.h: Include bits/floatn.h for _Float128 tests.
	(wcstof128): New declaration.
	(wcstof128_l): Likewise.
2017-06-12 14:48:53 -03:00
Joseph Myers bfff8b1bec Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Rajalakshmi Srinivasaraghavan bf5eea32ac Refactor strtod tests
This patch changes strtod* tests to use strfrom* functions.
2016-10-25 17:05:47 -02:00
Paul E. Murphy 1ced34c00a Refactor tst-strtod-round.c for type-generic-ness
Reduce much of the redundancy in this file, and attempt
to coral the type specific stuff to ease adding an new type.
2016-05-25 13:33:36 -05:00
Paul E. Murphy dba0832af1 Refactor bug-strtod.c to better test new types.
This introduces tst-strtod.h to contain some macros
to assist with updating strto{f,d,ld} test code to
support additional variants of this function.
2016-05-23 14:13:11 -05:00