Index: src/crankshaft/arm64/lithium-codegen-arm64.cc |
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
index 02dfc5881cbec3338347ae45fbb9565ab7578363..fda94f30bb4c48e85882499515b0184999244010 100644 |
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc |
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
@@ -277,9 +277,6 @@ void LCodeGen::AddToTranslation(LEnvironment* environment, |
if (op->IsStackSlot()) { |
int index = op->index(); |
- if (index >= 0) { |
- index += StandardFrameConstants::kFixedFrameSize / kPointerSize; |
- } |
if (is_tagged) { |
translation->StoreStackSlot(index); |
} else if (is_uint32) { |
@@ -289,9 +286,6 @@ void LCodeGen::AddToTranslation(LEnvironment* environment, |
} |
} else if (op->IsDoubleStackSlot()) { |
int index = op->index(); |
- if (index >= 0) { |
- index += StandardFrameConstants::kFixedFrameSize / kPointerSize; |
- } |
translation->StoreDoubleStackSlot(index); |
} else if (op->IsRegister()) { |
Register reg = ToRegister(op); |
@@ -864,14 +858,14 @@ bool LCodeGen::GenerateSafepointTable() { |
// We do not know how much data will be emitted for the safepoint table, so |
// force emission of the veneer pool. |
masm()->CheckVeneerPool(true, true); |
- safepoints_.Emit(masm(), GetStackSlotCount()); |
+ safepoints_.Emit(masm(), GetTotalFrameSlotCount()); |
return !is_aborted(); |
} |
void LCodeGen::FinishCode(Handle<Code> code) { |
DCHECK(is_done()); |
- code->set_stack_slots(GetStackSlotCount()); |
+ code->set_stack_slots(GetTotalFrameSlotCount()); |
code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
PopulateDeoptimizationData(code); |
} |
@@ -1155,7 +1149,7 @@ MemOperand LCodeGen::ToMemOperand(LOperand* op, StackMode stack_mode) const { |
DCHECK(!op->IsDoubleRegister()); |
DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot()); |
if (NeedsEagerFrame()) { |
- int fp_offset = StackSlotOffset(op->index()); |
+ int fp_offset = FrameSlotToFPOffset(op->index()); |
// Loads and stores have a bigger reach in positive offset than negative. |
// We try to access using jssp (positive offset) first, then fall back to |
// fp (negative offset) if that fails. |
@@ -1172,8 +1166,8 @@ MemOperand LCodeGen::ToMemOperand(LOperand* op, StackMode stack_mode) const { |
if ((stack_mode == kCanUseStackPointer) && |
!info()->saves_caller_doubles()) { |
int jssp_offset_to_fp = |
- StandardFrameConstants::kFixedFrameSizeFromFp + |
- (pushed_arguments_ + GetStackSlotCount()) * kPointerSize; |
+ (pushed_arguments_ + GetTotalFrameSlotCount()) * kPointerSize - |
+ StandardFrameConstants::kFixedFrameSizeAboveFp; |
int jssp_offset = fp_offset + jssp_offset_to_fp; |
if (masm()->IsImmLSScaled(jssp_offset, LSDoubleWord)) { |
return MemOperand(masm()->StackPointer(), jssp_offset); |