| Index: src/mips64/builtins-mips64.cc
|
| diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc
|
| index ff068196b83720322b2369c252f949371d80604b..286e88f55a3dd6a2fa84680a751659654acdae12 100644
|
| --- a/src/mips64/builtins-mips64.cc
|
| +++ b/src/mips64/builtins-mips64.cc
|
| @@ -528,6 +528,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| // -- a1 : constructor function
|
| // -- a2 : allocation site or undefined
|
| // -- a3 : new target
|
| + // -- cp : context
|
| // -- ra : return address
|
| // -- sp[...]: constructor arguments
|
| // -----------------------------------
|
| @@ -541,7 +542,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| // Preserve the incoming parameters on the stack.
|
| __ AssertUndefinedOrAllocationSite(a2, t0);
|
| __ SmiTag(a0);
|
| - __ Push(a2, a0);
|
| + __ Push(cp, a2, a0);
|
|
|
| if (create_implicit_receiver) {
|
| __ Push(a1, a3);
|
| @@ -612,7 +613,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| }
|
|
|
| // Restore context from the frame.
|
| - __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + __ ld(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset));
|
|
|
| if (create_implicit_receiver) {
|
| // If the result is an object (in the ECMA sense), we should get rid
|
| @@ -743,8 +744,6 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
| // -- s0: argv
|
| // -----------------------------------
|
| ProfileEntryHookStub::MaybeCallEntryHook(masm);
|
| - // Clear the context before we push it when entering the JS frame.
|
| - __ mov(cp, zero_reg);
|
|
|
| // Enter an internal frame.
|
| {
|
| @@ -839,9 +838,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
| // MANUAL indicates that the scope shouldn't actually generate code to set up
|
| // the frame (that is done below).
|
| FrameScope frame_scope(masm, StackFrame::MANUAL);
|
| -
|
| - __ Push(ra, fp, cp, a1);
|
| - __ Daddu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
|
| + __ PushStandardFrame(a1);
|
|
|
| // Get the bytecode array from the function object and load the pointer to the
|
| // first entry into kInterpreterBytecodeRegister.
|
| @@ -1197,8 +1194,7 @@ void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) {
|
| __ MultiPop(saved_regs);
|
|
|
| // Perform prologue operations usually performed by the young code stub.
|
| - __ Push(ra, fp, cp, a1);
|
| - __ Daddu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
|
| + __ PushStandardFrame(a1);
|
|
|
| // Jump to point after the code-age stub.
|
| __ Daddu(a0, a0, Operand((kNoCodeAgeSequenceLength)));
|
| @@ -1967,7 +1963,8 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg,
|
| // Drop possible interpreter handler/stub frame.
|
| {
|
| Label no_interpreter_frame;
|
| - __ ld(scratch3, MemOperand(fp, StandardFrameConstants::kMarkerOffset));
|
| + __ ld(scratch3,
|
| + MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset));
|
| __ Branch(&no_interpreter_frame, ne, scratch3,
|
| Operand(Smi::FromInt(StackFrame::STUB)));
|
| __ ld(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
|
| @@ -1977,7 +1974,8 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg,
|
| // Check if next frame is an arguments adaptor frame.
|
| Label no_arguments_adaptor, formal_parameter_count_loaded;
|
| __ ld(scratch2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
|
| - __ ld(scratch3, MemOperand(scratch2, StandardFrameConstants::kContextOffset));
|
| + __ ld(scratch3,
|
| + MemOperand(scratch2, CommonFrameConstants::kContextOrFrameTypeOffset));
|
| __ Branch(&no_arguments_adaptor, ne, scratch3,
|
| Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
|
|
|
| @@ -1990,7 +1988,8 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg,
|
|
|
| __ bind(&no_arguments_adaptor);
|
| // Load caller's formal parameter count
|
| - __ ld(scratch1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| + __ ld(scratch1,
|
| + MemOperand(fp, ArgumentsAdaptorFrameConstants::kFunctionOffset));
|
| __ ld(scratch1,
|
| FieldMemOperand(scratch1, JSFunction::kSharedFunctionInfoOffset));
|
| __ lw(scratch1,
|
|
|