Module Name:    src
Committed By:   joerg
Date:           Sat Feb 27 18:50:39 UTC 2016

Modified Files:
        src/doc: TODO.clang
        src/tests/lib/libc/sync: cpp_atomic_ops_linkable.cc

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/doc/TODO.clang
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sync/cpp_atomic_ops_linkable.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.clang
diff -u src/doc/TODO.clang:1.17 src/doc/TODO.clang:1.18
--- src/doc/TODO.clang:1.17	Thu May 14 19:27:23 2015
+++ src/doc/TODO.clang	Sat Feb 27 18:50:39 2016
@@ -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 @@ g++ otherwise crashes on trivial input.
 
 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.

Index: src/tests/lib/libc/sync/cpp_atomic_ops_linkable.cc
diff -u src/tests/lib/libc/sync/cpp_atomic_ops_linkable.cc:1.3 src/tests/lib/libc/sync/cpp_atomic_ops_linkable.cc:1.4
--- src/tests/lib/libc/sync/cpp_atomic_ops_linkable.cc:1.3	Sun Oct 12 12:26:41 2014
+++ src/tests/lib/libc/sync/cpp_atomic_ops_linkable.cc	Sat Feb 27 18:50:39 2016
@@ -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 @@ private:
   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 @@ int main(int argc, char **argv)
   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 @@ int main(int argc, char **argv)
 #ifdef __HAVE_ATOMIC64_OPS
   ATest<intmax_t>();
   ATest<uintmax_t>();
-#endif
+#endif /* NO_SHORT_ATOMICS */
 }

Reply via email to