Index: src/compiler/linkage.cc |
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc |
index c3f6074fa635453b5945947e60246793f981fb26..306224bc8bec6e657eee3174ad190e2652945d1c 100644 |
--- a/src/compiler/linkage.cc |
+++ b/src/compiler/linkage.cc |
@@ -205,10 +205,8 @@ FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame) const { |
} else { |
// No frame. Retrieve all parameters relative to stack pointer. |
DCHECK(spill_slot < 0); // Must be a parameter. |
- int offsetSpToFp = |
- kPointerSize * (StandardFrameConstants::kFixedSlotCountAboveFp - |
- frame->GetTotalFrameSlotCount()); |
- return FrameOffset::FromStackPointer(offset - offsetSpToFp); |
+ int sp_offset = offset + (frame->GetSpToFpSlotCount() * kPointerSize); |
+ return FrameOffset::FromStackPointer(sp_offset); |
} |
} |