summaryrefslogtreecommitdiffstats
path: root/runtime/stack.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-04-22 08:30:19 +0000
committerNicolas Geoffray <ngeoffray@google.com>2014-04-22 08:30:19 +0000
commit8d5ead52a92675c258113d3dfa71bf8fceba5d9f (patch)
tree43f4c2518035b346d7b7ecd46c4b79d1ef45d882 /runtime/stack.h
parent5cb328362a633302ca0fcdbaa0da7d94069df051 (diff)
downloadart-8d5ead52a92675c258113d3dfa71bf8fceba5d9f.zip
art-8d5ead52a92675c258113d3dfa71bf8fceba5d9f.tar.gz
art-8d5ead52a92675c258113d3dfa71bf8fceba5d9f.tar.bz2
Revert "64bit changes to the stack walker for the Quick ABI."
This reverts commit 5cb328362a633302ca0fcdbaa0da7d94069df051. Change-Id: Icc0ec1a9f15c2e4e9103e732d7ba75a4feb853b1
Diffstat (limited to 'runtime/stack.h')
-rw-r--r--runtime/stack.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/stack.h b/runtime/stack.h
index deba389..ab903d6 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -637,12 +637,11 @@ class StackVisitor {
size_t frame_size, int reg) {
DCHECK_EQ(frame_size & (kStackAlignment - 1), 0U);
DCHECK_NE(reg, static_cast<int>(kVRegInvalid));
- int spills = __builtin_popcount(core_spills) * kBytesPerGprSpillLocation
- + __builtin_popcount(fp_spills) * kBytesPerFprSpillLocation
- + sizeof(uint32_t); // Filler.
+
+ int num_spills = __builtin_popcount(core_spills) + __builtin_popcount(fp_spills) + 1; // Filler.
int num_ins = code_item->ins_size_;
int num_regs = code_item->registers_size_ - num_ins;
- int locals_start = frame_size - spills - num_regs * sizeof(uint32_t);
+ int locals_start = frame_size - ((num_spills + num_regs) * sizeof(uint32_t));
if (reg == static_cast<int>(kVRegMethodPtrBaseReg)) {
// The current method pointer corresponds to special location on stack.
return 0;
@@ -661,13 +660,13 @@ class StackVisitor {
return locals_start + (reg * sizeof(uint32_t));
} else {
// Handle ins.
- return frame_size + ((reg - num_regs) * sizeof(uint32_t)) + kWordSize;
+ return frame_size + ((reg - num_regs) * sizeof(uint32_t)) + sizeof(StackReference<mirror::ArtMethod>);
}
}
static int GetOutVROffset(uint16_t out_num) {
// According to stack model, the first out is above the Method ptr.
- return kWordSize + (out_num * sizeof(uint32_t));
+ return sizeof(StackReference<mirror::ArtMethod>) + (out_num * sizeof(uint32_t));
}
uintptr_t GetCurrentQuickFramePc() const {