[libcxx-commits] [libcxx] fba0b65 - [libc++] hash<long double>: adjust for x86-64 ILP32
Harald van Dijk via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Nov 29 05:52:41 PST 2020
Author: Harald van Dijk
Date: 2020-11-29T13:52:28Z
New Revision: fba0b65f727134e8d05c785b04b7b574f852d49e
URL: https://github.com/llvm/llvm-project/commit/fba0b65f727134e8d05c785b04b7b574f852d49e
DIFF: https://github.com/llvm/llvm-project/commit/fba0b65f727134e8d05c785b04b7b574f852d49e.diff
LOG: [libc++] hash<long double>: adjust for x86-64 ILP32
x86-64 ILP32 mode (x32) uses 32-bit size_t, so share the code with ix86 to zero out padding bits, not with x86-64 LP64 mode.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D91349
Added:
Modified:
libcxx/include/utility
Removed:
################################################################################
diff --git a/libcxx/include/utility b/libcxx/include/utility
index 13489de22c95..5c9e2b6ddef2 100644
--- a/libcxx/include/utility
+++ b/libcxx/include/utility
@@ -1506,7 +1506,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<long double>
// -0.0 and 0.0 should return same hash
if (__v == 0.0L)
return 0;
-#if defined(__i386__)
+#if defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__))
// Zero out padding bits
union
{
More information about the libcxx-commits
mailing list