summaryrefslogtreecommitdiff
path: root/runtime/quick_exception_handler.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-01-31 22:24:44 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-01-31 22:24:45 +0000
commit50a676848d644bbfafa9f47eff0ca9d2ccba6e4b (patch)
tree18cdb23c75a82c675146463a31e84cc155d952de /runtime/quick_exception_handler.cc
parent318797a758f81e7f8a0b440129238b9b5eb1b74e (diff)
parent45aa598cd1773f5eb1705dec13bea059238e054d (diff)
Merge "Deduplicate stack masks"
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r--runtime/quick_exception_handler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc
index 4e76951189..3ba30112fa 100644
--- a/runtime/quick_exception_handler.cc
+++ b/runtime/quick_exception_handler.cc
@@ -408,6 +408,7 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor {
StackMap stack_map = code_info.GetStackMapForNativePcOffset(native_pc_offset, encoding);
const size_t number_of_vregs = m->GetCodeItem()->registers_size_;
uint32_t register_mask = stack_map.GetRegisterMask(encoding.stack_map_encoding);
+ BitMemoryRegion stack_mask = code_info.GetStackMaskOf(encoding, stack_map);
DexRegisterMap vreg_map = IsInInlinedFrame()
? code_info.GetDexRegisterMapAtDepth(GetCurrentInliningDepth() - 1,
code_info.GetInlineInfoOf(stack_map, encoding),
@@ -440,8 +441,7 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor {
const uint8_t* addr = reinterpret_cast<const uint8_t*>(GetCurrentQuickFrame()) + offset;
value = *reinterpret_cast<const uint32_t*>(addr);
uint32_t bit = (offset >> 2);
- if (code_info.GetNumberOfStackMaskBits(encoding) > bit &&
- stack_map.GetStackMaskBit(encoding.stack_map_encoding, bit)) {
+ if (bit < encoding.stack_mask_size_in_bits && stack_mask.LoadBit(bit)) {
is_reference = true;
}
break;