public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-7636] libstdc++: Remove Ryu's uint128_t aliases
@ 2021-03-11 22:05 Patrick Palka
  0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2021-03-11 22:05 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:349adff208618c7d18d8ab12552a02509aacef47

commit r11-7636-g349adff208618c7d18d8ab12552a02509aacef47
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Mar 11 16:59:15 2021 -0500

    libstdc++: Remove Ryu's uint128_t aliases
    
    This makes Ryu consistently use the uint128_t alias that's defined in
    floating_to_chars.cc.
    
    libstdc++-v3/ChangeLog:
    
            * src/c++17/ryu/LOCAL_PATCHES: Update.
            * src/c++17/ryu/d2s_intrinsics.h: Don't define uint128_t.
            * src/c++17/ryu/generic_128.h: Likewise.
            * src/c++17/ryu/ryu_generic_128.h (struct floating_decimal_128):
            Use uint128_t instead of __uint128_t.
            (generic_binary_to_decimal): Likewise.

Diff:
---
 libstdc++-v3/src/c++17/ryu/LOCAL_PATCHES     | 1 +
 libstdc++-v3/src/c++17/ryu/d2s_intrinsics.h  | 4 ----
 libstdc++-v3/src/c++17/ryu/generic_128.h     | 3 ---
 libstdc++-v3/src/c++17/ryu/ryu_generic_128.h | 4 ++--
 4 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/libstdc++-v3/src/c++17/ryu/LOCAL_PATCHES b/libstdc++-v3/src/c++17/ryu/LOCAL_PATCHES
index c26633ee6c2..51e504cb6ea 100644
--- a/libstdc++-v3/src/c++17/ryu/LOCAL_PATCHES
+++ b/libstdc++-v3/src/c++17/ryu/LOCAL_PATCHES
@@ -1 +1,2 @@
 r11-6248
+r11-7636
diff --git a/libstdc++-v3/src/c++17/ryu/d2s_intrinsics.h b/libstdc++-v3/src/c++17/ryu/d2s_intrinsics.h
index fa993e6fad6..bbac4dfd48f 100644
--- a/libstdc++-v3/src/c++17/ryu/d2s_intrinsics.h
+++ b/libstdc++-v3/src/c++17/ryu/d2s_intrinsics.h
@@ -28,10 +28,6 @@
 #define HAS_64_BIT_INTRINSICS
 #endif
 
-#if defined(HAS_UINT128)
-typedef __uint128_t uint128_t;
-#endif
-
 #if defined(HAS_64_BIT_INTRINSICS)
 
 
diff --git a/libstdc++-v3/src/c++17/ryu/generic_128.h b/libstdc++-v3/src/c++17/ryu/generic_128.h
index 88e96776664..d3ca398fbdb 100644
--- a/libstdc++-v3/src/c++17/ryu/generic_128.h
+++ b/libstdc++-v3/src/c++17/ryu/generic_128.h
@@ -17,9 +17,6 @@
 #ifndef RYU_GENERIC128_H
 #define RYU_GENERIC128_H
 
-
-typedef __uint128_t uint128_t;
-
 #define FLOAT_128_POW5_INV_BITCOUNT 249
 #define FLOAT_128_POW5_BITCOUNT 249
 #define POW5_TABLE_SIZE 56
diff --git a/libstdc++-v3/src/c++17/ryu/ryu_generic_128.h b/libstdc++-v3/src/c++17/ryu/ryu_generic_128.h
index f5d476343b6..2afbf274e11 100644
--- a/libstdc++-v3/src/c++17/ryu/ryu_generic_128.h
+++ b/libstdc++-v3/src/c++17/ryu/ryu_generic_128.h
@@ -37,7 +37,7 @@ extern "C" {
 
 // A floating decimal representing (-1)^s * m * 10^e.
 struct floating_decimal_128 {
-  __uint128_t mantissa;
+  uint128_t mantissa;
   int32_t exponent;
   bool sign;
 };
@@ -52,7 +52,7 @@ struct floating_decimal_128 long_double_to_fd128(long double d);
 // Converts the given binary floating point number to the shortest decimal floating point number
 // that still accurately represents it.
 struct floating_decimal_128 generic_binary_to_decimal(
-    const __uint128_t bits, const uint32_t mantissaBits, const uint32_t exponentBits, const bool explicitLeadingBit);
+    const uint128_t bits, const uint32_t mantissaBits, const uint32_t exponentBits, const bool explicitLeadingBit);
 
 // Converts the given decimal floating point number to a string, writing to result, and returning
 // the number characters written. Does not terminate the buffer with a 0. In the worst case, this


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-11 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 22:05 [gcc r11-7636] libstdc++: Remove Ryu's uint128_t aliases Patrick Palka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).