Index: src/mips64/code-stubs-mips64.cc |
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc |
index 00c6591cc8384114bfc2096a312fb822f9f6a958..acb6de0e7dc8de98e0309fbfdb32cde207fa8c15 100644 |
--- a/src/mips64/code-stubs-mips64.cc |
+++ b/src/mips64/code-stubs-mips64.cc |
@@ -2066,9 +2066,10 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { |
void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
- // sp[0] : index of rest parameter |
- // sp[4] : number of parameters |
- // sp[8] : receiver displacement |
+ // sp[0] : language mode |
+ // sp[4] : index of rest parameter |
+ // sp[8] : number of parameters |
+ // sp[12] : receiver displacement |
// Check if the calling frame is an arguments adaptor frame. |
Label runtime; |
@@ -2079,17 +2080,17 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
// Patch the arguments.length and the parameters pointer. |
__ ld(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
- __ sd(a1, MemOperand(sp, 1 * kPointerSize)); |
+ __ sd(a1, MemOperand(sp, 2 * kPointerSize)); |
__ SmiScale(at, a1, kPointerSizeLog2); |
__ Daddu(a3, a2, Operand(at)); |
__ Daddu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); |
- __ sd(a3, MemOperand(sp, 2 * kPointerSize)); |
+ __ sd(a3, MemOperand(sp, 3 * kPointerSize)); |
// Do the runtime call to allocate the arguments object. |
__ bind(&runtime); |
- __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); |
+ __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); |
} |