| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 // LR : points to return address. | 779 // LR : points to return address. |
| 780 // R0 : code object of the Dart function to call. | 780 // R0 : code object of the Dart function to call. |
| 781 // R1 : arguments descriptor array. | 781 // R1 : arguments descriptor array. |
| 782 // R2 : arguments array. | 782 // R2 : arguments array. |
| 783 // R3 : current thread. | 783 // R3 : current thread. |
| 784 void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) { | 784 void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) { |
| 785 __ Comment("InvokeDartCodeStub"); | 785 __ Comment("InvokeDartCodeStub"); |
| 786 | 786 |
| 787 // Copy the C stack pointer (R31) into the stack pointer we'll actually use | 787 // Copy the C stack pointer (R31) into the stack pointer we'll actually use |
| 788 // to access the stack, and put the C stack pointer at the stack limit. | 788 // to access the stack, and put the C stack pointer at the stack limit. |
| 789 __ SetupDartSP(Isolate::GetSpecifiedStackSize()); | 789 __ SetupDartSP(OSThread::GetSpecifiedStackSize()); |
| 790 __ EnterFrame(0); | 790 __ EnterFrame(0); |
| 791 | 791 |
| 792 // Push code object to PC marker slot. | 792 // Push code object to PC marker slot. |
| 793 __ ldr(TMP, Address(R3, Thread::invoke_dart_code_stub_offset())); | 793 __ ldr(TMP, Address(R3, Thread::invoke_dart_code_stub_offset())); |
| 794 __ Push(TMP); | 794 __ Push(TMP); |
| 795 | 795 |
| 796 // Save the callee-saved registers. | 796 // Save the callee-saved registers. |
| 797 for (int i = kAbiFirstPreservedCpuReg; i <= kAbiLastPreservedCpuReg; i++) { | 797 for (int i = kAbiFirstPreservedCpuReg; i <= kAbiLastPreservedCpuReg; i++) { |
| 798 const Register r = static_cast<Register>(i); | 798 const Register r = static_cast<Register>(i); |
| 799 // We use str instead of the Push macro because we will be pushing the PP | 799 // We use str instead of the Push macro because we will be pushing the PP |
| (...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2189 __ Bind(&miss); | 2189 __ Bind(&miss); |
| 2190 __ LoadIsolate(R2); | 2190 __ LoadIsolate(R2); |
| 2191 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); | 2191 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); |
| 2192 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); | 2192 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); |
| 2193 __ ret(); | 2193 __ ret(); |
| 2194 } | 2194 } |
| 2195 | 2195 |
| 2196 } // namespace dart | 2196 } // namespace dart |
| 2197 | 2197 |
| 2198 #endif // defined TARGET_ARCH_ARM64 | 2198 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |