[libcxx-commits] [PATCH] D116338: Set std::numeric_limits<>::tinyness_before to true for floating point types on ARM platforms.
Owen Anderson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 12 09:41:16 PST 2022
resistor updated this revision to Diff 399360.
resistor added a comment.
Add __arch64__ to detect AArch64 properly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116338/new/
https://reviews.llvm.org/D116338
Files:
libcxx/include/limits
libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp
Index: libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp
===================================================================
--- libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp
+++ libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp
@@ -50,9 +50,15 @@
test<__int128_t, false>();
test<__uint128_t, false>();
#endif
+#if (defined(__arm__) || defined(__aarch64__))
+ test<float, true>();
+ test<double, true>();
+ test<long double, true>();
+#else
test<float, false>();
test<double, false>();
test<long double, false>();
+#endif
return 0;
}
Index: libcxx/include/limits
===================================================================
--- libcxx/include/limits
+++ libcxx/include/limits
@@ -339,7 +339,11 @@
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
static _LIBCPP_CONSTEXPR const bool traps = false;
+#if (defined(__arm__) || defined(__aarch64__))
+ static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
+#else
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
+#endif
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
};
@@ -385,7 +389,11 @@
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
static _LIBCPP_CONSTEXPR const bool traps = false;
+#if (defined(__arm__) || defined(__aarch64__))
+ static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
+#else
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
+#endif
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
};
@@ -435,7 +443,11 @@
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
static _LIBCPP_CONSTEXPR const bool traps = false;
+#if (defined(__arm__) || defined(__aarch64__))
+ static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
+#else
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
+#endif
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116338.399360.patch
Type: text/x-patch
Size: 2162 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220112/09b4a93b/attachment-0001.bin>
More information about the libcxx-commits
mailing list