diff options
author | Hans Boehm <hboehm@google.com> | 2014-06-07 01:41:29 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-06-07 01:41:29 +0000 |
commit | cef85adb4933bbd00ca122aa7357e02c716df326 (patch) | |
tree | 2f67fdd71f28fb5b3409cee80aab928b46ffc846 | |
parent | 5b4d2a7a69540119eff89019657d6c46e4648fc0 (diff) | |
parent | 2f4a2edda128bbee5c6ba6ba7e3cbca9260368c2 (diff) | |
download | android_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.h | 8 |
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 |