From 828186492aac39397ee4c139e54c2767bf3d7b66 Mon Sep 17 00:00:00 2001 From: buzbee Date: Wed, 4 Jun 2014 15:35:41 -0700 Subject: [PATCH] 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 --- runtime/stack.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runtime/stack.h b/runtime/stack.h index e1c8c809b..199111563 100644 --- a/runtime/stack.h +++ b/runtime/stack.h @@ -661,13 +661,14 @@ class StackVisitor { return locals_start + (reg * sizeof(uint32_t)); } else { // Handle ins. - return frame_size + ((reg - num_regs) * sizeof(uint32_t)) + sizeof(StackReference); + return frame_size + ((reg - num_regs) * sizeof(uint32_t)) + + sizeof(StackReference); } } 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) + (out_num * sizeof(uint32_t)); } uintptr_t GetCurrentQuickFramePc() const { -- 2.11.0