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

Unified Diff: runtime/vm/stub_code_arm64.cc

Issue 317443004: Uses assembler macro for dart SP setup on arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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_arm64_test.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_arm64.cc
===================================================================
--- runtime/vm/stub_code_arm64.cc (revision 36930)
+++ runtime/vm/stub_code_arm64.cc (working copy)
@@ -775,15 +775,19 @@
// R3 : new context containing the current isolate pointer.
void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) {
__ Comment("InvokeDartCodeStub");
+ // The new context, saved vm tag, the top exit frame, and the old context.
+ const intptr_t kNewContextOffsetFromFp =
+ -(1 + kAbiPreservedCpuRegCount + kAbiPreservedFpuRegCount) * kWordSize;
+
+ // Amount of space to reserve with the system stack pointer before setting it
+ // to the stack limit.
+ const intptr_t kRegSaveSpace = Utils::RoundUp(-kNewContextOffsetFromFp, 16);
+
// Copy the C stack pointer (R31) into the stack pointer we'll actually use
// to access the stack.
- __ mov(SP, CSP);
+ __ SetupDartSP(kRegSaveSpace);
__ EnterFrame(0);
- // The new context, saved vm tag, the top exit frame, and the old context.
- const intptr_t kNewContextOffsetFromFp =
- -(1 + kAbiPreservedCpuRegCount + kAbiPreservedFpuRegCount) * kWordSize;
-
// Save the callee-saved registers.
for (int i = kAbiFirstPreservedCpuReg; i <= kAbiLastPreservedCpuReg; i++) {
const Register r = static_cast<Register>(i);
« no previous file with comments | « runtime/vm/assembler_arm64_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698