]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Factor out uses of __int128 into a type alias
authorPatrick Palka <ppalka@redhat.com>
Thu, 11 Mar 2021 21:57:49 +0000 (16:57 -0500)
committerPatrick Palka <ppalka@redhat.com>
Thu, 11 Mar 2021 21:57:49 +0000 (16:57 -0500)
commita38fa1b31f758500dba21f5bb6e5c8f4770362a9
tree8089617c3d5f6aebd7157f18896b3a54330b271e
parent26ed5a28b18ad080e51e6b61f5f60d67b66fd5f3
libstdc++: Factor out uses of __int128 into a type alias

Since Ryu has the alias uint128_t for this same purpose, it seems best
for us to use this name as well, so as to minimize the amount of local
modifications we'd need to make to our copy of Ryu.  (In a subsequent
patch, we're going to remove Ryu's aliases so that it uses this one
defined in floating_to_chars.cc.)

libstdc++-v3/ChangeLog:

* src/c++17/floating_to_chars.cc (uint128_t): New conditionally
defined alias of unsigned __int128.
(floating_type_traits_binary128::mantissa_t): Use uint128_t
instead of unsigned __int128.
(floating_type_traits<long double>::mantissa_t)
[LONG_DOUBLE_KIND == LDK_IBM128]: Likewise.
(get_ieee_repr): Likewise.  Make casts from uint_t to mantissa_t
and uint32_t explicit.  Simplify the extraction of mantissa,
exponent and sign bit.
libstdc++-v3/src/c++17/floating_to_chars.cc