Index: src/mips64/builtins-mips64.cc |
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc |
index 7d7c12a2187b5cc5fe90d8c4379555fa45bbb963..c63d92d69d1d820e60454b4091e6647c757f2b7b 100644 |
--- a/src/mips64/builtins-mips64.cc |
+++ b/src/mips64/builtins-mips64.cc |
@@ -649,15 +649,15 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ bind(&count_incremented); |
} |
+ __ Pop(a1); |
+ |
__ Push(t0, t0); |
// Reload the number of arguments from the stack. |
// sp[0]: receiver |
// sp[1]: receiver |
- // sp[2]: constructor function |
- // sp[3]: number of arguments (smi-tagged) |
- __ ld(a1, MemOperand(sp, 2 * kPointerSize)); |
- __ ld(a3, MemOperand(sp, 3 * kPointerSize)); |
+ // sp[2]: number of arguments (smi-tagged) |
+ __ ld(a3, MemOperand(sp, 2 * kPointerSize)); |
// Set up pointer to last argument. |
__ Daddu(a2, fp, Operand(StandardFrameConstants::kCallerSPOffset)); |
@@ -672,8 +672,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// a3: number of arguments (smi-tagged) |
// sp[0]: receiver |
// sp[1]: receiver |
- // sp[2]: constructor function |
- // sp[3]: number of arguments (smi-tagged) |
+ // sp[2]: number of arguments (smi-tagged) |
Label loop, entry; |
__ SmiUntag(a3); |
__ jmp(&entry); |
@@ -715,8 +714,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// If the result is a smi, it is *not* an object in the ECMA sense. |
// v0: result |
// sp[0]: receiver (newly allocated object) |
- // sp[1]: constructor function |
- // sp[2]: number of arguments (smi-tagged) |
+ // sp[1]: number of arguments (smi-tagged) |
__ JumpIfSmi(v0, &use_receiver); |
// If the type of the result (stored in its map) is less than |
@@ -734,9 +732,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ bind(&exit); |
// v0: result |
// sp[0]: receiver (newly allocated object) |
- // sp[1]: constructor function |
- // sp[2]: number of arguments (smi-tagged) |
- __ ld(a1, MemOperand(sp, 2 * kPointerSize)); |
+ // sp[1]: number of arguments (smi-tagged) |
+ __ ld(a1, MemOperand(sp, kPointerSize)); |
// Leave construct frame. |
} |