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

Unified Diff: runtime/vm/stub_code_arm.cc

Issue 77413004: Pushes 0 for PC marker in runtime call stubs on ARM and MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
===================================================================
--- runtime/vm/stub_code_arm.cc (revision 30547)
+++ runtime/vm/stub_code_arm.cc (working copy)
@@ -39,8 +39,10 @@
const intptr_t argc_tag_offset = NativeArguments::argc_tag_offset();
const intptr_t argv_offset = NativeArguments::argv_offset();
const intptr_t retval_offset = NativeArguments::retval_offset();
- const intptr_t exitframe_last_param_slot_from_fp = 1;
+ const intptr_t exitframe_last_param_slot_from_fp = 2;
+ __ mov(IP, ShifterOperand(0));
+ __ Push(IP); // Push 0 for the PC marker.
__ EnterFrame((1 << FP) | (1 << LR), 0);
// Load current Isolate pointer from Context structure into R0.
@@ -98,6 +100,8 @@
__ mov(CTX, ShifterOperand(R2));
__ LeaveFrame((1 << FP) | (1 << LR));
+ // Adjust SP for the empty PC marker.
+ __ AddImmediate(SP, kWordSize);
__ Ret();
}
@@ -133,6 +137,8 @@
const intptr_t argv_offset = NativeArguments::argv_offset();
const intptr_t retval_offset = NativeArguments::retval_offset();
+ __ mov(IP, ShifterOperand(0));
+ __ Push(IP); // Push 0 for the PC marker.
__ EnterFrame((1 << FP) | (1 << LR), 0);
// Load current Isolate pointer from Context structure into R0.
@@ -168,7 +174,7 @@
// Set argv in NativeArguments: R2 already contains argv.
ASSERT(retval_offset == 3 * kWordSize);
- __ add(R3, FP, ShifterOperand(2 * kWordSize)); // Set retval in NativeArgs.
+ __ add(R3, FP, ShifterOperand(3 * kWordSize)); // Set retval in NativeArgs.
// TODO(regis): Should we pass the structure by value as in runtime calls?
// It would require changing Dart API for native functions.
@@ -203,6 +209,8 @@
__ mov(CTX, ShifterOperand(R2));
__ LeaveFrame((1 << FP) | (1 << LR));
+ // Adjust SP for the empty PC marker.
+ __ AddImmediate(SP, kWordSize);
__ Ret();
}
@@ -219,6 +227,8 @@
const intptr_t argv_offset = NativeArguments::argv_offset();
const intptr_t retval_offset = NativeArguments::retval_offset();
+ __ mov(IP, ShifterOperand(0));
+ __ Push(IP); // Push 0 for the PC marker.
__ EnterFrame((1 << FP) | (1 << LR), 0);
// Load current Isolate pointer from Context structure into R0.
@@ -254,7 +264,7 @@
// Set argv in NativeArguments: R2 already contains argv.
ASSERT(retval_offset == 3 * kWordSize);
- __ add(R3, FP, ShifterOperand(2 * kWordSize)); // Set retval in NativeArgs.
+ __ add(R3, FP, ShifterOperand(3 * kWordSize)); // Set retval in NativeArgs.
// TODO(regis): Should we pass the structure by value as in runtime calls?
// It would require changing Dart API for native functions.
@@ -280,6 +290,8 @@
__ mov(CTX, ShifterOperand(R2));
__ LeaveFrame((1 << FP) | (1 << LR));
+ // Adjust SP for the empty PC marker.
+ __ AddImmediate(SP, kWordSize);
__ Ret();
}
« no previous file with comments | « runtime/vm/stack_frame.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698