| 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);
|
|
|