Add alignment attribute to packed.
Make packed objects 4 byte aligned or else GCC becomes paranoid and
assumes only byte alignment on whole objects.
Change CHECK in GetCalleeSaveMethod to DCHECK to encourage inlining.
Change-Id: I79f1a13752492413c919b36f4e207e637647834f
diff --git a/src/dex_instruction.h b/src/dex_instruction.h
index 486bbf5..48dbb0c 100644
--- a/src/dex_instruction.h
+++ b/src/dex_instruction.h
@@ -38,7 +38,7 @@
kArrayDataSignature = 0x0300,
};
- struct PACKED PackedSwitchPayload {
+ struct PACKED(4) PackedSwitchPayload {
const uint16_t ident;
const uint16_t case_count;
const int32_t first_key;
@@ -47,7 +47,7 @@
DISALLOW_COPY_AND_ASSIGN(PackedSwitchPayload);
};
- struct PACKED SparseSwitchPayload {
+ struct PACKED(4) SparseSwitchPayload {
const uint16_t ident;
const uint16_t case_count;
const int32_t keys_and_targets[];
@@ -65,7 +65,7 @@
DISALLOW_COPY_AND_ASSIGN(SparseSwitchPayload);
};
- struct PACKED ArrayDataPayload {
+ struct PACKED(4) ArrayDataPayload {
const uint16_t ident;
const uint16_t element_width;
const uint32_t element_count;