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

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 27588004: Fixes a bug in runtime call stub on arm and mips. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/stub_code_arm.cc ('k') | no next file » | 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 28802)
+++ runtime/vm/stub_code_mips.cc (working copy)
@@ -42,10 +42,7 @@
__ SetPrologueOffset();
__ TraceSimMsg("CallToRuntimeStub");
- __ addiu(SP, SP, Immediate(-2 * kWordSize));
- __ sw(RA, Address(SP, 1 * kWordSize));
- __ sw(FP, Address(SP, 0 * kWordSize));
- __ mov(FP, SP);
+ __ EnterStubFrame();
// Load current Isolate pointer from Context structure into A0.
__ lw(A0, FieldAddress(CTX, Context::isolate_offset()));
@@ -79,7 +76,8 @@
ASSERT(argv_offset == 2 * kWordSize);
__ sll(A2, S4, 2);
__ addu(A2, FP, A2); // Compute argv.
- __ addiu(A2, A2, Immediate(kWordSize)); // Set argv in NativeArguments.
+ // Set argv in NativeArguments.
+ __ addiu(A2, A2, Immediate(kParamEndSlotFromFp * kWordSize));
ASSERT(retval_offset == 3 * kWordSize);
@@ -104,11 +102,7 @@
// Cache Context pointer into CTX while executing Dart code.
__ mov(CTX, A2);
- __ mov(SP, FP);
- __ lw(RA, Address(SP, 1 * kWordSize));
- __ lw(FP, Address(SP, 0 * kWordSize));
- __ Ret();
- __ delay_slot()->addiu(SP, SP, Immediate(2 * kWordSize));
+ __ LeaveStubFrameAndReturn();
}
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698