Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src When building the atomic op test on SPARC64 with Clang, skip...
details: https://anonhg.NetBSD.org/src/rev/7ad1c9a55f87
branches: trunk
changeset: 813950:7ad1c9a55f87
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Feb 27 18:50:39 2016 +0000
description:
When building the atomic op test on SPARC64 with Clang, skip the
sub-32bit tests for now. Clang currently doesn't synthesize a CAS
replacement nor does it create a libcall.
diffstat:
doc/TODO.clang | 5 ++++-
tests/lib/libc/sync/cpp_atomic_ops_linkable.cc | 16 ++++++++++++++--
2 files changed, 18 insertions(+), 3 deletions(-)
diffs (82 lines):
diff -r c50324fb1b3f -r 7ad1c9a55f87 doc/TODO.clang
--- a/doc/TODO.clang Sat Feb 27 18:34:12 2016 +0000
+++ b/doc/TODO.clang Sat Feb 27 18:50:39 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: TODO.clang,v 1.17 2015/05/14 19:27:23 joerg Exp $
+$NetBSD: TODO.clang,v 1.18 2016/02/27 18:50:39 joerg Exp $
Hacks for the clang integration
-------------------------------
@@ -11,3 +11,6 @@
src/external/mit/xorg/lib/pixman uses -fno-integrated-as on ARM for the
macro (ab)use.
+
+src/tests/lib/libc/sync disables tests for atomics shorter than 32bit on
+SPARC64 due to missing codegen support.
diff -r c50324fb1b3f -r 7ad1c9a55f87 tests/lib/libc/sync/cpp_atomic_ops_linkable.cc
--- a/tests/lib/libc/sync/cpp_atomic_ops_linkable.cc Sat Feb 27 18:34:12 2016 +0000
+++ b/tests/lib/libc/sync/cpp_atomic_ops_linkable.cc Sat Feb 27 18:50:39 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpp_atomic_ops_linkable.cc,v 1.3 2014/10/12 12:26:41 martin Exp $ */
+/* $NetBSD: cpp_atomic_ops_linkable.cc,v 1.4 2016/02/27 18:50:39 joerg Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -58,13 +58,19 @@
volatile std::atomic<T> m_val;
};
+#if defined(__clang__) && defined(__sparc64__)
+#define NO_SHORT_ATOMICS
+#endif
+
int main(int argc, char **argv)
{
+#ifndef NO_SHORT_ATOMICS
ATest<char>();
ATest<signed char>();
ATest<unsigned char>();
ATest<short>();
ATest<unsigned short>();
+#endif
ATest<int>();
ATest<unsigned int>();
ATest<long>();
@@ -73,23 +79,29 @@
ATest<long long>();
ATest<unsigned long long>();
#endif
+#ifndef NO_SHORT_ATOMICS
ATest<char16_t>();
+#endif
ATest<char32_t>();
ATest<wchar_t>();
+#ifndef NO_SHORT_ATOMICS
ATest<int_least8_t>();
ATest<uint_least8_t>();
ATest<int_least16_t>();
ATest<uint_least16_t>();
+#endif
ATest<int_least32_t>();
ATest<uint_least32_t>();
#ifdef __HAVE_ATOMIC64_OPS
ATest<int_least64_t>();
ATest<uint_least64_t>();
#endif
+#ifndef NO_SHORT_ATOMICS
ATest<int_fast8_t>();
ATest<uint_fast8_t>();
ATest<int_fast16_t>();
ATest<uint_fast16_t>();
+#endif
ATest<int_fast32_t>();
ATest<uint_fast32_t>();
#ifdef __HAVE_ATOMIC64_OPS
@@ -103,5 +115,5 @@
#ifdef __HAVE_ATOMIC64_OPS
ATest<intmax_t>();
ATest<uintmax_t>();
-#endif
+#endif /* NO_SHORT_ATOMICS */
}
Home |
Main Index |
Thread Index |
Old Index