diff options
| author | 2015-03-12 18:33:05 +0000 | |
|---|---|---|
| committer | 2015-03-12 18:33:19 +0000 | |
| commit | 9ac0e4d4ed1b45cf8767ef1d339afcdd205bf55a (patch) | |
| tree | f5a53e3e10a138b4b301d60f9abc1011e945bda5 /compiler/optimizing/stack_map_stream.h | |
| parent | 4054413950cbee5d304a7c29f08c21fb33d33d08 (diff) | |
Force word alignment of Dex register maps.
Plus some cosmetic changes.
Change-Id: I45e805aa87c2ef8fe8907eaae726cd2188b54897
Diffstat (limited to 'compiler/optimizing/stack_map_stream.h')
| -rw-r--r-- | compiler/optimizing/stack_map_stream.h | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h index 79bebd2e64..76ddbf3204 100644 --- a/compiler/optimizing/stack_map_stream.h +++ b/compiler/optimizing/stack_map_stream.h @@ -129,7 +129,8 @@ class StackMapStream : public ValueObject {        DexRegisterLocation entry = dex_register_maps_.Get(i);        size += DexRegisterMap::EntrySize(entry);      } -    return size; +    // On ARM, the Dex register maps must be 4-byte aligned. +    return RoundUp(size, kWordAlignment);    }    // Compute the size of all the inline information pieces. @@ -139,12 +140,12 @@ class StackMapStream : public ValueObject {        + (number_of_stack_maps_with_inline_info_ * InlineInfo::kFixedSize);    } -  size_t ComputeDexRegisterMapStart() const { +  size_t ComputeDexRegisterMapsStart() const {      return CodeInfo::kFixedSize + ComputeStackMapSize();    }    size_t ComputeInlineInfoStart() const { -    return ComputeDexRegisterMapStart() + ComputeDexRegisterMapsSize(); +    return ComputeDexRegisterMapsStart() + ComputeDexRegisterMapsSize();    }    void FillIn(MemoryRegion region) { @@ -155,7 +156,7 @@ class StackMapStream : public ValueObject {      uint8_t* memory_start = region.start();      MemoryRegion dex_register_maps_region = region.Subregion( -      ComputeDexRegisterMapStart(), +      ComputeDexRegisterMapsStart(),        ComputeDexRegisterMapsSize());      MemoryRegion inline_infos_region = region.Subregion( |