summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-10-17 18:31:16 -0700
committerStephen Hines <srhines@google.com>2014-10-17 18:31:16 -0700
commit56610421fd0f182e835717aff569b1ad0c9ca4b9 (patch)
tree0323685ce955e5bf326efe3e1e4b4111025dd277
parente377e8bf82e5cc180f4c609bc3ace91554e407f2 (diff)
download3.5-56610421fd0f182e835717aff569b1ad0c9ca4b9.tar.gz
Updated clang for Cortex-A53 fixes.
Bug: 18034609 Change-Id: Ib42fc0d2dfb650f2effefad551d77489b3a81c21
-rwxr-xr-xbin/clangbin35775420 -> 35809056 bytes
-rwxr-xr-xbin/llvm-asbin2299164 -> 2296848 bytes
-rwxr-xr-xbin/llvm-linkbin3427756 -> 3423476 bytes
-rw-r--r--lib/clang/3.5/include/stdatomic.h77
-rwxr-xr-xlib/libc++.dylibbin1559256 -> 1559856 bytes
5 files changed, 66 insertions, 11 deletions
diff --git a/bin/clang b/bin/clang
index eba2764..bb8603b 100755
--- a/bin/clang
+++ b/bin/clang
Binary files differ
diff --git a/bin/llvm-as b/bin/llvm-as
index 921f22d..2e492fc 100755
--- a/bin/llvm-as
+++ b/bin/llvm-as
Binary files differ
diff --git a/bin/llvm-link b/bin/llvm-link
index 657d3f0..8bd2baa 100755
--- a/bin/llvm-link
+++ b/bin/llvm-link
Binary files differ
diff --git a/lib/clang/3.5/include/stdatomic.h b/lib/clang/3.5/include/stdatomic.h
index adf60bb..58cb1bc 100644
--- a/lib/clang/3.5/include/stdatomic.h
+++ b/lib/clang/3.5/include/stdatomic.h
@@ -32,13 +32,33 @@
#include <sys/cdefs.h>
-#if defined(__cplusplus) && defined(_USING_LIBCXX) && \
- (__has_feature(cxx_atomic) || _GNUC_VER >= 407)
+
+#if defined(__cplusplus) && __cplusplus >= 201103L && defined(_USING_LIBCXX)
+# ifdef __clang__
+# if __has_feature(cxx_atomic)
+# define _STDATOMIC_HAVE_ATOMIC
+# endif
+# else /* gcc */
+# if __GNUC_PREREQ(4, 7)
+# define _STDATOMIC_HAVE_ATOMIC
+# endif
+# endif
+#endif
+
+#ifdef _STDATOMIC_HAVE_ATOMIC
/* We have a usable C++ <atomic>; use it instead. */
#include <atomic>
+#undef _Atomic
+ /* Also defined by <atomic> for gcc. But not used in macros. */
+ /* Also a clang intrinsic. */
+ /* Should not be used by client code before this file is */
+ /* included. The definitions in <atomic> themselves see */
+ /* the old definition, as they should. */
+ /* Client code sees the following definition. */
+
#define _Atomic(t) std::atomic<t>
using std::atomic_is_lock_free;
@@ -69,6 +89,7 @@ using std::atomic_signal_fence;
using std::memory_order;
using std::memory_order_relaxed;
using std::memory_order_consume;
+using std::memory_order_acquire;
using std::memory_order_release;
using std::memory_order_acq_rel;
using std::memory_order_seq_cst;
@@ -129,14 +150,24 @@ using std::atomic_uintmax_t;
# include <uchar.h> /* For char16_t and char32_t. */
#endif
-#if __has_extension(c_atomic) || __has_extension(cxx_atomic)
-#define __CLANG_ATOMICS
-#elif __GNUC_PREREQ__(4, 7)
-#define __GNUC_ATOMICS
-#elif defined(__GNUC__)
-#define __SYNC_ATOMICS
+#ifdef __clang__
+# if __has_extension(c_atomic) || __has_extension(cxx_atomic)
+# define __CLANG_ATOMICS
+# else
+# error "stdatomic.h does not support your compiler"
+# endif
+# if __has_builtin(__sync_swap)
+# define __HAS_BUILTIN_SYNC_SWAP
+# endif
#else
-#error "stdatomic.h does not support your compiler"
+# if __GNUC_PREREQ(4, 7)
+# define __GNUC_ATOMICS
+# else
+# define __SYNC_ATOMICS
+# ifdef __cplusplus
+# define __ATOMICS_AVOID_DOT_INIT
+# endif
+# endif
#endif
/*
@@ -145,33 +176,53 @@ using std::atomic_uintmax_t;
#ifdef __GCC_ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_BOOL_LOCK_FREE 2 /* For all modern platforms */
#endif
#ifdef __GCC_ATOMIC_CHAR_LOCK_FREE
#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_CHAR16_T_LOCK_FREE
#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR16_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_CHAR32_T_LOCK_FREE
#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR32_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_WCHAR_T_LOCK_FREE
#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_WCHAR_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_SHORT_LOCK_FREE
#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_SHORT_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_INT_LOCK_FREE
#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_INT_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_LONG_LOCK_FREE
#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_LONG_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_LLONG_LOCK_FREE
#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_LLONG_LOCK_FREE 1 /* maybe */
#endif
#ifdef __GCC_ATOMIC_POINTER_LOCK_FREE
#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_POINTER_LOCK_FREE 2
#endif
/*
@@ -182,7 +233,11 @@ using std::atomic_uintmax_t;
#define ATOMIC_VAR_INIT(value) (value)
#define atomic_init(obj, value) __c11_atomic_init(obj, value)
#else
+#ifdef __ATOMICS_AVOID_DOT_INIT
+#define ATOMIC_VAR_INIT(value) { value }
+#else
#define ATOMIC_VAR_INIT(value) { .__val = (value) }
+#endif
#define atomic_init(obj, value) ((void)((obj)->__val = (value)))
#endif
@@ -282,7 +337,7 @@ atomic_signal_fence(memory_order __order __attribute__((unused)))
* 7.17.6 Atomic integer types.
*/
-#if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
+#ifndef __CLANG_ATOMICS
/*
* No native support for _Atomic(). Place object in structure to prevent
* most forms of direct non-atomic access.
@@ -403,7 +458,7 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
desired, success, failure) \
atomic_compare_exchange_strong_explicit(object, expected, \
desired, success, failure)
-#if __has_builtin(__sync_swap)
+#ifdef __HAS_BUILTIN_SYNC_SWAP
/* Clang provides a full-barrier atomic exchange - use it if available. */
#define atomic_exchange_explicit(object, desired, order) \
((void)(order), __sync_swap(&(object)->__val, desired))
diff --git a/lib/libc++.dylib b/lib/libc++.dylib
index cf738e0..ce698f0 100755
--- a/lib/libc++.dylib
+++ b/lib/libc++.dylib
Binary files differ