diff options
author | Patrick Palka <ppalka@redhat.com> | 2021-03-11 17:02:27 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2021-03-11 17:02:27 -0500 |
commit | c4f8e568aa66a8461ee39d5f85c2e2d41a833b7f (patch) | |
tree | ad21899bd308e7cab9bcf28c7514370a16309350 /gcc/ada/gcc-interface/utils.c | |
parent | 349adff208618c7d18d8ab12552a02509aacef47 (diff) | |
download | gcc-c4f8e568aa66a8461ee39d5f85c2e2d41a833b7f.zip gcc-c4f8e568aa66a8461ee39d5f85c2e2d41a833b7f.tar.gz gcc-c4f8e568aa66a8461ee39d5f85c2e2d41a833b7f.tar.bz2 |
libstdc++: Add a fallback 128-bit integer class type and use it
This implements a minimal integer class type that emulates 128-bit
unsigned arithmetic using a pair of 64-bit integers, which the
floating-point std::to_chars implementation then uses as a drop-in
replacement for unsigned __int128 on targets that lack the latter.
After this patch, we now fully support formatting of large long double
types on such targets.
Since Ryu performs 128-bit division/modulus only by 2, 5 and 10, this
integer class type supports only these divisors rather than general
division/modulus.
libstdc++-v3/ChangeLog:
* src/c++17/floating_to_chars.cc: Simplify the file as if
__SIZEOF_INT128__ is always defined.
[!defined __SIZEOF_INT128__]: Include "uint128_t.h". Define
a base-10 to_chars overload for the uint128_t class type.
* src/c++17/uint128_t.h: New file.
* testsuite/20_util/to_chars/long_double.cc: No longer expect an
execution FAIL on targets that have a large long double type
but lack __int128.
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
0 files changed, 0 insertions, 0 deletions