diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__charconv/tables.h')
-rw-r--r-- | contrib/llvm-project/libcxx/include/__charconv/tables.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/contrib/llvm-project/libcxx/include/__charconv/tables.h b/contrib/llvm-project/libcxx/include/__charconv/tables.h index a2f7f7ce29b3..83f39e6fd2ef 100644 --- a/contrib/llvm-project/libcxx/include/__charconv/tables.h +++ b/contrib/llvm-project/libcxx/include/__charconv/tables.h @@ -35,6 +35,11 @@ struct __table { static const uint32_t __pow10_32[10]; static const uint64_t __pow10_64[20]; +# ifndef _LIBCPP_HAS_NO_INT128 + // TODO FMT Reduce the number of entries in this table. + static const __uint128_t __pow10_128[40]; + static const int __pow10_128_offset = 0; +# endif static const char __digits_base_10[200]; }; @@ -106,6 +111,51 @@ const uint64_t __table<_Tp>::__pow10_64[20] = {UINT64_C(0), UINT64_C(1000000000000000000), UINT64_C(10000000000000000000)}; +# ifndef _LIBCPP_HAS_NO_INT128 +template <class _Tp> +const __uint128_t __table<_Tp>::__pow10_128[40] = { + UINT64_C(0), + UINT64_C(10), + UINT64_C(100), + UINT64_C(1000), + UINT64_C(10000), + UINT64_C(100000), + UINT64_C(1000000), + UINT64_C(10000000), + UINT64_C(100000000), + UINT64_C(1000000000), + UINT64_C(10000000000), + UINT64_C(100000000000), + UINT64_C(1000000000000), + UINT64_C(10000000000000), + UINT64_C(100000000000000), + UINT64_C(1000000000000000), + UINT64_C(10000000000000000), + UINT64_C(100000000000000000), + UINT64_C(1000000000000000000), + UINT64_C(10000000000000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100000000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000000000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100000000000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000000000000000000), + __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000000000000), + (__uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000000000000)) * 10}; +# endif + template <class _Tp> const char __table<_Tp>::__digits_base_10[200] = { // clang-format off |