64bit changes to the stack walker for the Quick ABI.

- Spill registers have different sizes.
- The ArtMethod at the bottom of the stack is always of kWordSize.

Change-Id: I92f67ff928477970c393c7146980255d08e8e6af
diff --git a/runtime/stack.h b/runtime/stack.h
index ab903d6..deba389 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -637,11 +637,12 @@
                            size_t frame_size, int reg) {
     DCHECK_EQ(frame_size & (kStackAlignment - 1), 0U);
     DCHECK_NE(reg, static_cast<int>(kVRegInvalid));
-
-    int num_spills = __builtin_popcount(core_spills) + __builtin_popcount(fp_spills) + 1;  // Filler.
+    int spills = __builtin_popcount(core_spills) * kBytesPerGprSpillLocation
+        + __builtin_popcount(fp_spills) * kBytesPerFprSpillLocation
+        + sizeof(uint32_t);  // Filler.
     int num_ins = code_item->ins_size_;
     int num_regs = code_item->registers_size_ - num_ins;
-    int locals_start = frame_size - ((num_spills + num_regs) * sizeof(uint32_t));
+    int locals_start = frame_size - spills - num_regs * sizeof(uint32_t);
     if (reg == static_cast<int>(kVRegMethodPtrBaseReg)) {
       // The current method pointer corresponds to special location on stack.
       return 0;
@@ -660,13 +661,13 @@
       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)) + kWordSize;
     }
   }
 
   static int GetOutVROffset(uint16_t out_num) {
     // According to stack model, the first out is above the Method ptr.
-    return sizeof(StackReference<mirror::ArtMethod>) + (out_num * sizeof(uint32_t));
+    return kWordSize + (out_num * sizeof(uint32_t));
   }
 
   uintptr_t GetCurrentQuickFramePc() const {