glibc/include/gmp.h

59 lines
1.9 KiB
C
Raw Normal View History

/* Include gmp-mparam.h first, such that definitions of _SHORT_LIMB
and _LONG_LONG_LIMB in it can take effect into gmp.h. */
#include <gmp-mparam.h>
#ifndef __GMP_H__
#include <stdlib/gmp.h>
#include <bits/floatn.h>
#ifndef _ISOMAC
/* Now define the internal interfaces. */
extern mp_size_t __mpn_extract_double (mp_ptr res_ptr, mp_size_t size,
int *expt, int *is_neg,
double value) attribute_hidden;
extern mp_size_t __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
int *expt, int *is_neg,
long double value)
attribute_hidden;
#if __HAVE_DISTINCT_FLOAT128
extern mp_size_t __mpn_extract_float128 (mp_ptr res_ptr, mp_size_t size,
int *expt, int *is_neg,
_Float128 value)
attribute_hidden;
#endif
extern float __mpn_construct_float (mp_srcptr frac_ptr, int expt, int sign)
attribute_hidden;
extern double __mpn_construct_double (mp_srcptr frac_ptr, int expt,
int negative) attribute_hidden;
extern long double __mpn_construct_long_double (mp_srcptr frac_ptr, int expt,
int sign)
attribute_hidden;
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.
2016-07-25 18:10:00 +00:00
#if __HAVE_DISTINCT_FLOAT128
extern _Float128 __mpn_construct_float128 (mp_srcptr frac_ptr, int expt,
int sign) attribute_hidden;
#endif
extern __typeof (mpn_add_1) mpn_add_1 attribute_hidden;
extern __typeof (mpn_addmul_1) mpn_addmul_1 attribute_hidden;
extern __typeof (mpn_add_n) mpn_add_n attribute_hidden;
extern __typeof (mpn_cmp) mpn_cmp attribute_hidden;
extern __typeof (mpn_divrem) mpn_divrem attribute_hidden;
extern __typeof (mpn_lshift) mpn_lshift attribute_hidden;
extern __typeof (mpn_mul) mpn_mul attribute_hidden;
extern __typeof (mpn_mul_1) mpn_mul_1 attribute_hidden;
extern __typeof (mpn_rshift) mpn_rshift attribute_hidden;
extern __typeof (mpn_sub_1) mpn_sub_1 attribute_hidden;
extern __typeof (mpn_submul_1) mpn_submul_1 attribute_hidden;
extern __typeof (mpn_sub_n) mpn_sub_n attribute_hidden;
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.
2016-07-25 18:10:00 +00:00
#endif
#endif