[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 Dec 29 11:40:00 PST 2021


resistor updated this revision to Diff 396559.
resistor marked an inline comment as done.
resistor added a comment.

Remove the platform verification test. Unfortunately, getting this to work consistently
across different compilers isn't really tractable given the state of strict floating point
support in various compilers/versions.


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
+#ifdef __arm__
+    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;
+#ifdef __arm__
+    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;
+#ifdef __arm__
+    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;
+#ifdef __arm__
+    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.396559.patch
Type: text/x-patch
Size: 2034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211229/6390982d/attachment.bin>


More information about the libcxx-commits mailing list