diff options
author | buzbee <buzbee@google.com> | 2014-06-04 15:35:41 -0700 |
---|---|---|
committer | buzbee <buzbee@google.com> | 2014-06-04 16:00:40 -0700 |
commit | 828186492aac39397ee4c139e54c2767bf3d7b66 (patch) | |
tree | 73ccb5e4e32f4a697e34f60781aab42450d88bf0 /runtime/stack.h | |
parent | 903e390ffd46955628d1161ccfa8de9177d42d22 (diff) | |
download | art-828186492aac39397ee4c139e54c2767bf3d7b66.zip art-828186492aac39397ee4c139e54c2767bf3d7b66.tar.gz art-828186492aac39397ee4c139e54c2767bf3d7b66.tar.bz2 |
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
Diffstat (limited to 'runtime/stack.h')
-rw-r--r-- | runtime/stack.h | 7 |
1 files changed, 4 insertions, 3 deletions
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 @@ class StackVisitor { 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 { |