Chromium Code Reviews| Index: runtime/vm/stub_code_mips.cc |
| =================================================================== |
| --- runtime/vm/stub_code_mips.cc (revision 26893) |
| +++ runtime/vm/stub_code_mips.cc (working copy) |
| @@ -911,13 +911,22 @@ |
| // Save new context and C++ ABI callee-saved registers. |
| const intptr_t kNewContextOffset = |
| - -(1 + kAbiPreservedCpuRegCount) * kWordSize; |
| + -(1 + kAbiPreservedCpuRegCount + kAbiPreservedFpuRegCount) * kWordSize; |
| + const intptr_t kPreservedRegSpace = |
| + (kAbiPreservedCpuRegCount + kAbiPreservedFpuRegCount + 3) * kWordSize; |
|
regis
2013/08/30 01:53:39
What are these 3 registers you save? 1 is the new
zra
2013/09/03 15:09:11
Done.
|
| - __ addiu(SP, SP, Immediate(-(3 + kAbiPreservedCpuRegCount) * kWordSize)); |
| + __ addiu(SP, SP, Immediate(-kPreservedRegSpace)); |
| for (int i = S0; i <= S7; i++) { |
| Register r = static_cast<Register>(i); |
| __ sw(r, Address(SP, (i - S0 + 3) * kWordSize)); |
| } |
| + |
| + for (intptr_t i = F20; i <= F31; i++) { |
| + FRegister r = static_cast<FRegister>(i); |
| + __ swc1(r, |
| + Address(SP, (kAbiPreservedCpuRegCount + 3 + i - F20) * kWordSize)); |
| + } |
| + |
| __ sw(A3, Address(SP, 2 * kWordSize)); |
| // The new Context structure contains a pointer to the current Isolate |
| @@ -946,13 +955,13 @@ |
| // The constants kSavedContextSlotFromEntryFp and |
| // kExitLinkSlotFromEntryFp must be kept in sync with the code below. |
| - ASSERT(kExitLinkSlotFromEntryFp == -10); |
| - ASSERT(kSavedContextSlotFromEntryFp == -11); |
| + ASSERT(kExitLinkSlotFromEntryFp == -22); |
| + ASSERT(kSavedContextSlotFromEntryFp == -23); |
| __ sw(T0, Address(SP, 1 * kWordSize)); |
| __ sw(T1, Address(SP, 0 * kWordSize)); |
| // After the call, The stack pointer is restored to this location. |
| - // Pushed A3, S0-7, T0, T1 = 11. |
| + // Pushed A3, S0-7, F20-31, T0, T1 = 23. |
| // Load arguments descriptor array into S4, which is passed to Dart code. |
| __ lw(S4, Address(A1, VMHandles::kOffsetOfRawPtrInHandle)); |
| @@ -1008,8 +1017,15 @@ |
| Register r = static_cast<Register>(i); |
| __ lw(r, Address(SP, (i - S0 + 3) * kWordSize)); |
| } |
| + |
| + for (intptr_t i = F20; i <= F31; i++) { |
| + FRegister r = static_cast<FRegister>(i); |
| + __ lwc1(r, |
| + Address(SP, (kAbiPreservedCpuRegCount + 3 + i - F20) * kWordSize)); |
|
regis
2013/08/30 01:53:39
3 -> named constant defined above.
zra
2013/09/03 15:09:11
Done.
|
| + } |
| + |
| __ lw(A3, Address(SP, 2 * kWordSize)); |
| - __ addiu(SP, SP, Immediate((3 + kAbiPreservedCpuRegCount) * kWordSize)); |
| + __ addiu(SP, SP, Immediate(kPreservedRegSpace)); |
| // Restore the frame pointer and return. |
| __ LeaveStubFrameAndReturn(); |