summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/double-conversion/double-conversion/ieee.h
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2022-02-17 18:01:52 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2022-02-21 14:52:35 +0100
commitb1d8fb327920a5e0c4c062ab4eed7768a89af4b3 (patch)
tree4489c771e48f7d15a4fcd38152f9cc57eaa1cc84 /src/3rdparty/double-conversion/double-conversion/ieee.h
parent04f49e6881f96cae8886b14a1f1285e509c323a5 (diff)
3rdparty: Update double-conversion
The old patch is removed but another was needed to fix a warning from MSVC about truncation which is taken from e634f265db5d296bd7a780f9813d6b8573f5bd90 in the master branch. Since there is no other changes to the double-conversion directory between 3.2.0 and that change we are essentially using that commit directly. Pick-to: 6.3 Fixes: QTBUG-100988 Change-Id: Ia69f39f61ef989907fdf097f897bece0b3af7194 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/3rdparty/double-conversion/double-conversion/ieee.h')
-rw-r--r--src/3rdparty/double-conversion/double-conversion/ieee.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/3rdparty/double-conversion/double-conversion/ieee.h b/src/3rdparty/double-conversion/double-conversion/ieee.h
index 3c2a5979ff..9203f4d558 100644
--- a/src/3rdparty/double-conversion/double-conversion/ieee.h
+++ b/src/3rdparty/double-conversion/double-conversion/ieee.h
@@ -150,11 +150,19 @@ class Double {
}
bool IsQuietNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ return IsNan() && ((AsUint64() & kQuietNanBit) == 0);
+#else
return IsNan() && ((AsUint64() & kQuietNanBit) != 0);
+#endif
}
bool IsSignalingNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ return IsNan() && ((AsUint64() & kQuietNanBit) != 0);
+#else
return IsNan() && ((AsUint64() & kQuietNanBit) == 0);
+#endif
}
@@ -236,7 +244,12 @@ class Double {
private:
static const int kDenormalExponent = -kExponentBias + 1;
static const uint64_t kInfinity = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF00000, 00000000);
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ static const uint64_t kNaN = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF7FFFF, FFFFFFFF);
+#else
static const uint64_t kNaN = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF80000, 00000000);
+#endif
+
const uint64_t d64_;
@@ -336,11 +349,19 @@ class Single {
}
bool IsQuietNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ return IsNan() && ((AsUint32() & kQuietNanBit) == 0);
+#else
return IsNan() && ((AsUint32() & kQuietNanBit) != 0);
+#endif
}
bool IsSignalingNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ return IsNan() && ((AsUint32() & kQuietNanBit) != 0);
+#else
return IsNan() && ((AsUint32() & kQuietNanBit) == 0);
+#endif
}
@@ -410,7 +431,11 @@ class Single {
static const int kDenormalExponent = -kExponentBias + 1;
static const int kMaxExponent = 0xFF - kExponentBias;
static const uint32_t kInfinity = 0x7F800000;
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ static const uint32_t kNaN = 0x7FBFFFFF;
+#else
static const uint32_t kNaN = 0x7FC00000;
+#endif
const uint32_t d32_;