diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc index 90d236a0b2..8f12ff4f2b 100644 --- a/src/mips/code-stubs-mips.cc +++ b/src/mips/code-stubs-mips.cc @@ -3693,10 +3693,10 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { // args // Save callee saved registers on the stack. - __ MultiPush((kCalleeSaved | ra.bit()) & ~sp.bit()); + __ MultiPush(kCalleeSaved | ra.bit()); // Load argv in s0 register. - __ lw(s0, MemOperand(sp, kNumCalleeSaved * kPointerSize + + __ lw(s0, MemOperand(sp, (kNumCalleeSaved + 1) * kPointerSize + StandardFrameConstants::kCArgsSlotsSize)); // We build an EntryFrame. @@ -3830,7 +3830,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { __ addiu(sp, sp, -EntryFrameConstants::kCallerFPOffset); // Restore callee saved registers from the stack. - __ MultiPop((kCalleeSaved | ra.bit()) & ~sp.bit()); + __ MultiPop(kCalleeSaved | ra.bit()); // Return. __ Jump(ra); } diff --git a/src/mips/frames-mips.h b/src/mips/frames-mips.h index 8c605a39d9..1899843a19 100644 --- a/src/mips/frames-mips.h +++ b/src/mips/frames-mips.h @@ -59,10 +59,10 @@ static const RegList kCalleeSaved = // Saved temporaries. 1 << 16 | 1 << 17 | 1 << 18 | 1 << 19 | 1 << 20 | 1 << 21 | 1 << 22 | 1 << 23 | - // gp, sp, fp. - 1 << 28 | 1 << 29 | 1 << 30; + // fp. + 1 << 30; -static const int kNumCalleeSaved = 11; +static const int kNumCalleeSaved = 9; // Number of registers for which space is reserved in safepoints. Must be a