Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1483)

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 23671003: Saves callee-saved fpu registers on MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/stack_frame_mips.h ('k') | tests/isolate/isolate.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « runtime/vm/stack_frame_mips.h ('k') | tests/isolate/isolate.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698