Chromium Code Reviews| Index: src/mips/code-stubs-mips.cc |
| diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc |
| index 9385f2fda7af2fe9c6c03e393b91bddfd00deaa5..cad4bc78a90edad8f259f15398882147f4a104cf 100644 |
| --- a/src/mips/code-stubs-mips.cc |
| +++ b/src/mips/code-stubs-mips.cc |
| @@ -3695,9 +3695,20 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { |
| // Save callee saved registers on the stack. |
| __ MultiPush(kCalleeSaved | ra.bit()); |
| + if (CpuFeatures::IsSupported(FPU)) { |
| + CpuFeatures::Scope scope(FPU); |
| + // Save callee-saved FPU registers. |
| + __ MultiPushFPU(kCalleeSavedFPU); |
| + } |
| + |
| // Load argv in s0 register. |
| - __ lw(s0, MemOperand(sp, (kNumCalleeSaved + 1) * kPointerSize + |
| - StandardFrameConstants::kCArgsSlotsSize)); |
| + int offset_to_argv = (kNumCalleeSaved + 1) * kPointerSize; |
| + if (CpuFeatures::IsSupported(FPU)) { |
| + offset_to_argv += kNumCalleeSavedFPU * kDoubleSize; |
| + } |
| + |
| + __ lw(s0, MemOperand(sp, offset_to_argv + |
| + StandardFrameConstants::kCArgsSlotsSize)); |
| // We build an EntryFrame. |
| __ li(t3, Operand(-1)); // Push a bad frame pointer to fail if it is used. |
| @@ -3829,6 +3840,8 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { |
| // Reset the stack to the callee saved registers. |
| __ addiu(sp, sp, -EntryFrameConstants::kCallerFPOffset); |
| + __ MultiPopFPU(kCalleeSavedFPU); |
|
Yang
2011/08/31 12:38:44
Shouldn't this be surrounded by the conditional "i
Paul Lind
2011/09/01 06:50:27
Done.
|
| + |
| // Restore callee saved registers from the stack. |
| __ MultiPop(kCalleeSaved | ra.bit()); |
| // Return. |