summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2015-03-12 18:33:05 +0000
committerRoland Levillain <rpl@google.com>2015-03-12 18:33:19 +0000
commit9ac0e4d4ed1b45cf8767ef1d339afcdd205bf55a (patch)
treef5a53e3e10a138b4b301d60f9abc1011e945bda5 /runtime
parent4054413950cbee5d304a7c29f08c21fb33d33d08 (diff)
downloadart-9ac0e4d4ed1b45cf8767ef1d339afcdd205bf55a.zip
art-9ac0e4d4ed1b45cf8767ef1d339afcdd205bf55a.tar.gz
art-9ac0e4d4ed1b45cf8767ef1d339afcdd205bf55a.tar.bz2
Force word alignment of Dex register maps.
Plus some cosmetic changes. Change-Id: I45e805aa87c2ef8fe8907eaae726cd2188b54897
Diffstat (limited to 'runtime')
-rw-r--r--runtime/stack_map.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/stack_map.h b/runtime/stack_map.h
index c981623..e88820f 100644
--- a/runtime/stack_map.h
+++ b/runtime/stack_map.h
@@ -28,6 +28,9 @@ namespace art {
// (signed) values.
static ssize_t constexpr kFrameSlotSize = 4;
+// Word alignment required on ARM, in bytes.
+static constexpr size_t kWordAlignment = 4;
+
/**
* Classes in the following file are wrapper on stack map information backed
* by a MemoryRegion. As such they read and write to the region, they don't have
@@ -526,9 +529,9 @@ class StackMap {
&& region_.size() == other.region_.size();
}
- static size_t ComputeAlignedStackMapSize(size_t stack_map_size) {
+ static size_t ComputeAlignedStackMapSize(size_t stack_mask_size) {
// On ARM, the stack maps must be 4-byte aligned.
- return RoundUp(StackMap::kFixedSize + stack_map_size, 4);
+ return RoundUp(StackMap::kFixedSize + stack_mask_size, kWordAlignment);
}
// Special (invalid) offset for the DexRegisterMapOffset field meaning