mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-04 09:14:04 +08:00
a855debfb4
* libquadmath.texi (FLT128_DIG, FLT128_MIN_10_EXP, FLT128_MAX_10_EXP): Document. (strtoflt128): Remove obsolete comment. * configure.ac (HAVE_STRTOULL): New check. * printf/gmp-impl.h (mpn_construct_float128): New prototype, define. * printf/mul_n.c: Include <config.h>. * printf/add_n.c: Likewise. * printf/cmp.c: Likewise. * printf/fpioconst.c: Likewise. * printf/mul_1.c: Likewise. * printf/rshift.c: Likewise. * printf/lshift.c: Likewise. * printf/submul_1.c: Likewise. * printf/sub_n.c: Likewise. * printf/divrem.c: Likewise. * printf/addmul_1.c: Likewise. * printf/mul.c: Likewise. * printf/quadmath-printf.h (isupper, isdigit, tolower): Change to avoid evaluating argument multiple times. (isxdigit): Redefine. * strtod/strtoflt128.c: New file. * strtod/strtod_l.c: New file. * strtod/mpn2flt128.c: New file. * strtod/grouping.h: New file. * strtod/tens_in_limb.c: New file. * gdtoa/arith.h: Removed. * gdtoa/gd_qnan.h: Removed. * gdtoa/gdtoa_fltrnds.h: Removed. * gdtoa/gdtoa.h: Removed. * gdtoa/gdtoaimp.h: Removed. * gdtoa/gethex.c: Removed. * gdtoa/gmisc.c: Removed. * gdtoa/hd_init.c: Removed. * gdtoa/hexnan.c: Removed. * gdtoa/makefile: Removed. * gdtoa/misc.c: Removed. * gdtoa/README.gdtoa: Removed. * gdtoa/smisc.c: Removed. * gdtoa/strtodg.c: Removed. * gdtoa/strtopQ.c: Removed. * gdtoa/sum.c: Removed. * quadmath.h (FLT128_DIG, FLT128_MIN_10_EXP, FLT128_MAX_10_EXP): Define. * Makefile.am (libquadmath_la_SOURCES): Remove gdtoa/*, add strtod/strtoflt128.c, strtod/mpn2flt128.c and strtod/tens_in_limb.c. * config.h.in: Regenerated. * configure: Regenerated. * Makefile.in: Regenerated. From-SVN: r170254
34 lines
1.0 KiB
C
34 lines
1.0 KiB
C
#include <config.h>
|
|
#include "../printf/gmp-impl.h"
|
|
|
|
|
|
/* Definitions according to limb size used. */
|
|
#if BITS_PER_MP_LIMB == 32
|
|
# define MAX_DIG_PER_LIMB 9
|
|
# define MAX_FAC_PER_LIMB 1000000000UL
|
|
#elif BITS_PER_MP_LIMB == 64
|
|
# define MAX_DIG_PER_LIMB 19
|
|
# define MAX_FAC_PER_LIMB 10000000000000000000ULL
|
|
#else
|
|
# error "mp_limb_t size " BITS_PER_MP_LIMB "not accounted for"
|
|
#endif
|
|
|
|
|
|
/* Local data structure. */
|
|
const mp_limb_t __quadmath_tens_in_limb[MAX_DIG_PER_LIMB + 1] attribute_hidden
|
|
=
|
|
{ 0, 10, 100,
|
|
1000, 10000, 100000L,
|
|
1000000L, 10000000L, 100000000L,
|
|
1000000000L
|
|
#if BITS_PER_MP_LIMB > 32
|
|
, 10000000000ULL, 100000000000ULL,
|
|
1000000000000ULL, 10000000000000ULL, 100000000000000ULL,
|
|
1000000000000000ULL, 10000000000000000ULL, 100000000000000000ULL,
|
|
1000000000000000000ULL, 10000000000000000000ULL
|
|
#endif
|
|
#if BITS_PER_MP_LIMB > 64
|
|
#error "Need to expand tens_in_limb table to" MAX_DIG_PER_LIMB
|
|
#endif
|
|
};
|