Commit 5e8ba681 authored by akos.palfi's avatar akos.palfi Committed by Commit bot

MIPS: Fix '[turbofan]: Support using push instructions for setting up tail call parameters'

Port bd0d9e7d

BUG=

Review-Url: https://codereview.chromium.org/2122643003
Cr-Commit-Position: refs/heads/master@{#37499}
parent 21b3c06e
......@@ -559,7 +559,7 @@ void AdjustStackPointerForTailCall(MacroAssembler* masm,
masm->Subu(sp, sp, stack_slot_delta * kPointerSize);
state->IncreaseSPDelta(stack_slot_delta);
} else if (allow_shrinkage && stack_slot_delta < 0) {
masm->Addu(sp, sp, stack_slot_delta * kPointerSize);
masm->Addu(sp, sp, -stack_slot_delta * kPointerSize);
state->IncreaseSPDelta(stack_slot_delta);
}
}
......@@ -620,6 +620,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
CHECK(!instr->InputAt(0)->IsImmediate());
__ Jump(i.InputRegister(0));
frame_access_state()->ClearSPDelta();
frame_access_state()->SetFrameAccessToDefault();
break;
}
case kArchCallJSFunction: {
......@@ -655,7 +656,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
__ lw(at, FieldMemOperand(func, JSFunction::kCodeEntryOffset));
__ Jump(at);
frame_access_state()->ClearSPDelta();
frame_access_state()->SetFrameAccessToDefault();
break;
}
case kArchPrepareCallCFunction: {
......
......@@ -570,7 +570,7 @@ void AdjustStackPointerForTailCall(MacroAssembler* masm,
masm->Dsubu(sp, sp, stack_slot_delta * kPointerSize);
state->IncreaseSPDelta(stack_slot_delta);
} else if (allow_shrinkage && stack_slot_delta < 0) {
masm->Daddu(sp, sp, stack_slot_delta * kPointerSize);
masm->Daddu(sp, sp, -stack_slot_delta * kPointerSize);
state->IncreaseSPDelta(stack_slot_delta);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment