| Index: src/compiler/ppc/code-generator-ppc.cc
|
| diff --git a/src/compiler/ppc/code-generator-ppc.cc b/src/compiler/ppc/code-generator-ppc.cc
|
| index 2da3a8d5c4a64a9b61ddd905a1cac928b124a12c..06aff27e0a1967d39e7c2ff3ca126bfd85ab3c94 100644
|
| --- a/src/compiler/ppc/code-generator-ppc.cc
|
| +++ b/src/compiler/ppc/code-generator-ppc.cc
|
| @@ -605,11 +605,15 @@ Condition FlagsConditionToCondition(FlagsCondition condition) {
|
| } while (0)
|
|
|
|
|
| -void CodeGenerator::AssembleDeconstructActivationRecord() {
|
| +void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) {
|
| CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
|
| int stack_slots = frame()->GetSpillSlotCount();
|
| + int sp_delta =
|
| + (stack_param_delta < 0) ? -stack_param_delta * kPointerSize : 0;
|
| if (descriptor->IsJSFunctionCall() || stack_slots > 0) {
|
| - __ LeaveFrame(StackFrame::MANUAL);
|
| + __ LeaveFrame(StackFrame::MANUAL, sp_delta);
|
| + } else if (sp_delta) {
|
| + __ Add(sp, sp, sp_delta, r0);
|
| }
|
| }
|
|
|
| @@ -637,7 +641,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| break;
|
| }
|
| case kArchTailCallCodeObject: {
|
| - AssembleDeconstructActivationRecord();
|
| + int stack_param_delta = i.InputInt32(instr->InputCount() - 1);
|
| + AssembleDeconstructActivationRecord(stack_param_delta);
|
| if (HasRegisterInput(instr, 0)) {
|
| __ addi(ip, i.InputRegister(0),
|
| Operand(Code::kHeaderSize - kHeapObjectTag));
|
| @@ -679,7 +684,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| __ cmp(cp, kScratchReg);
|
| __ Assert(eq, kWrongFunctionContext);
|
| }
|
| - AssembleDeconstructActivationRecord();
|
| + int stack_param_delta = i.InputInt32(instr->InputCount() - 1);
|
| + AssembleDeconstructActivationRecord(stack_param_delta);
|
| __ LoadP(ip, FieldMemOperand(func, JSFunction::kCodeEntryOffset));
|
| __ Jump(ip);
|
| DCHECK_EQ(LeaveRC, i.OutputRCBit());
|
|
|