[libcxx-commits] [PATCH] D157699: [libc++][test] Fix max_test for Arm big endian

Michael Platings via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 11 03:11:36 PDT 2023


michaelplatings created this revision.
michaelplatings added a reviewer: philnik.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
michaelplatings requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

With ABI version 2 and big endian Arm, the full_size test matches the
current behaviour. It's possible that this would also be the case for
other big endian architectures but I don't have data on that.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157699

Files:
  libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp


Index: libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
===================================================================
--- libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
+++ libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
@@ -92,7 +92,15 @@
 
 #else
 
+# if defined(__arm__) || defined(__aarch64__)
+#   ifdef __BIG_ENDIAN__
+  full_size();
+#   else
   half_size();
+#   endif
+# else
+  half_size();
+# endif
 
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157699.549319.patch
Type: text/x-patch
Size: 506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230811/497d8f7b/attachment.bin>


More information about the libcxx-commits mailing list