summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2014-06-07 01:41:29 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-06-07 01:41:29 +0000
commitcef85adb4933bbd00ca122aa7357e02c716df326 (patch)
tree2f67fdd71f28fb5b3409cee80aab928b46ffc846
parent5b4d2a7a69540119eff89019657d6c46e4648fc0 (diff)
parent2f4a2edda128bbee5c6ba6ba7e3cbca9260368c2 (diff)
downloadandroid_art-cef85adb4933bbd00ca122aa7357e02c716df326.tar.gz
android_art-cef85adb4933bbd00ca122aa7357e02c716df326.tar.bz2
android_art-cef85adb4933bbd00ca122aa7357e02c716df326.zip
Merge "Don't assert int64_t alignment on x86."
-rw-r--r--runtime/atomic.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/atomic.h b/runtime/atomic.h
index 4ec1f4e877..04daea85b1 100644
--- a/runtime/atomic.h
+++ b/runtime/atomic.h
@@ -561,8 +561,12 @@ COMPILE_ASSERT(sizeof(AtomicInteger) == sizeof(int32_t), weird_atomic_int_size);
COMPILE_ASSERT(alignof(AtomicInteger) == alignof(int32_t),
atomic_int_alignment_differs_from_that_of_underlying_type);
COMPILE_ASSERT(sizeof(Atomic<int64_t>) == sizeof(int64_t), weird_atomic_int64_size);
-COMPILE_ASSERT(alignof(Atomic<int64_t>) == alignof(int64_t),
- atomic_int64_alignment_differs_from_that_of_underlying_type);
+#if defined(__LP64__)
+ COMPILE_ASSERT(alignof(Atomic<int64_t>) == alignof(int64_t),
+ atomic_int64_alignment_differs_from_that_of_underlying_type);
+#endif
+// The above fails on x86-32.
+// This is OK, since we explicitly arrange for alignment of 8-byte fields.
#if !ART_HAVE_STDATOMIC