Updated PACKED to alignas for DexCachePair and TLS data structures am: f15e067185

Original change: https://android-review.googlesource.com/c/platform/art/+/2962593

Change-Id: I0d5635bbd629718a9875a162013b74d8815ffb8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index 642d675..b69086c 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -76,7 +76,7 @@
 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 921d802..d934647 100644
--- a/runtime/mirror/dex_cache.h
+++ b/runtime/mirror/dex_cache.h
@@ -53,7 +53,7 @@
 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 @@
   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 5a9c55a..b1afac1 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -1946,7 +1946,7 @@
   // 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 @@
     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 @@
     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),