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

Unified Diff: runtime/vm/assembler_arm.cc

Issue 19017007: Implements OSR for arm and mips. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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_arm.h ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.cc
===================================================================
--- runtime/vm/assembler_arm.cc (revision 24893)
+++ runtime/vm/assembler_arm.cc (working copy)
@@ -8,6 +8,7 @@
#include "vm/assembler.h"
#include "vm/simulator.h"
#include "vm/runtime_entry.h"
+#include "vm/stack_frame.h"
#include "vm/stub_code.h"
// An extra check since we are assuming the existence of /proc/cpuinfo below.
@@ -2046,6 +2047,7 @@
void Assembler::EnterDartFrame(intptr_t frame_size) {
const intptr_t offset = CodeSize();
+
// Save PC in frame for fast identification of corresponding code.
// Note that callee-saved registers can be added to the register list.
EnterFrame((1 << PP) | (1 << FP) | (1 << LR) | (1 << PC), 0);
@@ -2066,6 +2068,27 @@
}
+// On entry to a function compiled for OSR, the caller's frame pointer, the
+// stack locals, and any copied parameters are already in place. The frame
+// pointer is already set up. The PC marker is not correct for the
+// optimized function and there may be extra space for spill slots to
+// allocate. We must also set up the pool pointer for the function.
+void Assembler::EnterOsrFrame(intptr_t extra_size) {
+ const intptr_t offset = CodeSize();
+
+ Comment("EnterOsrFrame");
+ mov(TMP, ShifterOperand(PC));
+
+ AddImmediate(TMP, -offset);
+ str(TMP, Address(FP, kPcMarkerSlotFromFp * kWordSize));
+
+ // Setup pool pointer for this dart function.
+ LoadPoolPointer();
+
+ AddImmediate(SP, -extra_size);
+}
+
+
void Assembler::LeaveDartFrame() {
LeaveFrame((1 << PP) | (1 << FP) | (1 << LR));
// Adjust SP for PC pushed in EnterDartFrame.
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698