diff options
-rw-r--r-- | runtime/mirror/class.h | 2 | ||||
-rw-r--r-- | runtime/mirror/dex_cache.h | 4 | ||||
-rw-r--r-- | runtime/thread.h | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h index 642d675808..b69086c971 100644 --- a/runtime/mirror/class.h +++ b/runtime/mirror/class.h @@ -76,7 +76,7 @@ class DexCache; class Field; class IfTable; class Method; -template <typename T> struct PACKED(8) DexCachePair; +template <typename T> struct alignas(8) DexCachePair; // C++ mirror of java.lang.Class class EXPORT MANAGED Class final : public Object { diff --git a/runtime/mirror/dex_cache.h b/runtime/mirror/dex_cache.h index 921d8028e7..d93464759f 100644 --- a/runtime/mirror/dex_cache.h +++ b/runtime/mirror/dex_cache.h @@ -53,7 +53,7 @@ class DexCache; class MethodType; class String; -template <typename T> struct PACKED(8) DexCachePair { +template <typename T> struct alignas(8) DexCachePair { GcRoot<T> object; uint32_t index; // The array is initially [ {0,0}, {0,0}, {0,0} ... ] @@ -90,7 +90,7 @@ template <typename T> struct PACKED(8) DexCachePair { T* GetObjectForIndex(uint32_t idx) REQUIRES_SHARED(Locks::mutator_lock_); }; -template <typename T> struct PACKED(2 * __SIZEOF_POINTER__) NativeDexCachePair { +template <typename T> struct alignas(2 * __SIZEOF_POINTER__) NativeDexCachePair { T* object; size_t index; // This is similar to DexCachePair except that we're storing a native pointer diff --git a/runtime/thread.h b/runtime/thread.h index 5a9c55aa14..b1afac1345 100644 --- a/runtime/thread.h +++ b/runtime/thread.h @@ -1946,7 +1946,7 @@ class EXPORT Thread { // first if possible. /***********************************************************************************************/ - struct PACKED(4) tls_32bit_sized_values { + struct alignas(4) tls_32bit_sized_values { // We have no control over the size of 'bool', but want our boolean fields // to be 4-byte quantities. using bool32_t = uint32_t; @@ -2074,7 +2074,7 @@ class EXPORT Thread { uint32_t shared_method_hotness; } tls32_; - struct PACKED(8) tls_64bit_sized_values { + struct alignas(8) tls_64bit_sized_values { tls_64bit_sized_values() : trace_clock_base(0) { } @@ -2084,7 +2084,7 @@ class EXPORT Thread { RuntimeStats stats; } tls64_; - struct PACKED(sizeof(void*)) tls_ptr_sized_values { + struct alignas(sizeof(void*)) tls_ptr_sized_values { tls_ptr_sized_values() : card_table(nullptr), exception(nullptr), stack_end(nullptr), |