Fix GetOutVROffset to use correct Method* size.
[Tip 'o the hat to Mark Mendell for noticing this one]
Use StackReference to find Method* size in GetOutVROffset.
Change-Id: Ie1b25eb839c59305cadc5fdc7cbb5f41f1a85686
diff --git a/runtime/stack.h b/runtime/stack.h
index e1c8c80..1991115 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -661,13 +661,14 @@
return locals_start + (reg * sizeof(uint32_t));
} else {
// Handle ins.
- return frame_size + ((reg - num_regs) * sizeof(uint32_t)) + sizeof(StackReference<mirror::ArtMethod>);
+ return frame_size + ((reg - num_regs) * sizeof(uint32_t)) +
+ sizeof(StackReference<mirror::ArtMethod>);
}
}
static int GetOutVROffset(uint16_t out_num, InstructionSet isa) {
- // According to stack model, the first out is above the Method ptr.
- return GetBytesPerGprSpillLocation(isa) + (out_num * sizeof(uint32_t));
+ // According to stack model, the first out is above the Method referernce.
+ return sizeof(StackReference<mirror::ArtMethod>) + (out_num * sizeof(uint32_t));
}
uintptr_t GetCurrentQuickFramePc() const {