rebase of these patches

This commit is contained in:
Sylvestre Ledru 2024-07-28 21:44:04 +02:00
parent ef6f66c73a
commit 7bbc73cbe1

View File

@ -10,16 +10,16 @@ To set instruction support one can check __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 defi
Bug: https://llvm.org/bugs/show_bug.cgi?id=19355
Index: llvm-toolchain-snapshot_17~++20230517015648+0b6264738f3d/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
Index: llvm-toolchain-snapshot_20~++20240727010229+4f5ad22b95ba/libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.cpp
===================================================================
--- llvm-toolchain-snapshot_17~++20230517015648+0b6264738f3d.orig/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
+++ llvm-toolchain-snapshot_17~++20230517015648+0b6264738f3d/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
@@ -18,6 +18,14 @@
--- llvm-toolchain-snapshot_20~++20240727010229+4f5ad22b95ba.orig/libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.cpp
+++ llvm-toolchain-snapshot_20~++20240727010229+4f5ad22b95ba/libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.cpp
@@ -22,6 +22,14 @@
#include "test_macros.h"
#include "atomic_helpers.h"
+#if defined(__i386__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)
+/* Fix for clang setting __GCC_ATOMIC_LLONG_LOCK_FREE incorecctly for x86
+/* Fix for clang setting __GCC_ATOMIC_LLONG_LOCK_FREE incorrectly for x86
+ * https://llvm.org/bugs/show_bug.cgi?id=19355
+ */
+#undef ATOMIC_LLONG_LOCK_FREE
@ -27,5 +27,5 @@ Index: llvm-toolchain-snapshot_17~++20230517015648+0b6264738f3d/libcxx/test/std/
+#endif
+
template <typename T>
void checkAlwaysLockFree() {
if (std::atomic<T>::is_always_lock_free) {
void check_always_lock_free(std::atomic<T> const& a) {
using InfoT = LockFreeStatusInfo<T>;