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

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 16160013: Changes to run "Hello, world!" on MIPS hardware. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/assembler_mips.cc ('k') | tools/gyp/configurations_make.gypi » ('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 23482)
+++ runtime/vm/stub_code_mips.cc (working copy)
@@ -62,7 +62,7 @@
// Reserve space for arguments and align frame before entering C++ world.
// NativeArguments are passed in registers.
ASSERT(sizeof(NativeArguments) == 4 * kWordSize);
- __ ReserveAlignedFrameSpace(0);
+ __ ReserveAlignedFrameSpace(4 * kWordSize); // Reserve space for arguments.
// Pass NativeArguments structure by value and call runtime.
// Registers A0, A1, A2, and A3 are used.
@@ -161,11 +161,6 @@
// Cache Isolate pointer into CTX while executing native code.
__ mov(CTX, A0);
- // Reserve space for the native arguments structure passed on the stack (the
- // outgoing pointer parameter to the native arguments structure is passed in
- // R0) and align frame before entering the C++ world.
- __ ReserveAlignedFrameSpace(sizeof(NativeArguments));
-
// Initialize NativeArguments structure and call native function.
// Registers A0, A1, A2, and A3 are used.
@@ -191,10 +186,12 @@
__ sw(A2, Address(SP, 2 * kWordSize));
__ sw(A1, Address(SP, 1 * kWordSize));
__ sw(A0, Address(SP, 0 * kWordSize));
+ __ mov(A0, SP); // Pass the pointer to the NativeArguments.
+ __ ReserveAlignedFrameSpace(kWordSize); // Just passing A0.
+
// Call native function or redirection via simulator.
__ jalr(T5);
- __ delay_slot()->mov(A0, SP); // Pass the pointer to the NativeArguments.
__ TraceSimMsg("CallNativeCFunctionStub return");
// Reset exit frame information in Isolate structure.
@@ -1478,7 +1475,7 @@
// Generate inline cache check for 'num_args'.
-// AR: return address
+// RA: return address
// S5: Inline cache data object.
// S4: Arguments descriptor array.
// Control flow:
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | tools/gyp/configurations_make.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698