summaryrefslogtreecommitdiffstats
path: root/runtime/atomic.h
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2014-06-06 18:17:43 -0700
committerHans Boehm <hboehm@google.com>2014-06-06 18:32:41 -0700
commit2f4a2edda128bbee5c6ba6ba7e3cbca9260368c2 (patch)
tree13bed4f69c16cf6b1ac2f92b087a1435ca2e27b0 /runtime/atomic.h
parent9e0d8d6efdbc46d3364eb3d02a4686f00cc8e6ca (diff)
downloadart-2f4a2edda128bbee5c6ba6ba7e3cbca9260368c2.tar.gz
art-2f4a2edda128bbee5c6ba6ba7e3cbca9260368c2.tar.bz2
art-2f4a2edda128bbee5c6ba6ba7e3cbca9260368c2.zip
Don't assert int64_t alignment on x86.
Fix build. Change-Id: I1b798bb3c5ab4954b46d54cda8f8c237ab4ae53e
Diffstat (limited to 'runtime/atomic.h')
-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