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 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2287 | 2287 |
2288 __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); | 2288 __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); |
2289 __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); | 2289 __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); |
2290 __ br(R1); | 2290 __ br(R1); |
2291 } | 2291 } |
2292 | 2292 |
2293 | 2293 |
2294 // Called from the monomorphic checked entry. | 2294 // Called from the monomorphic checked entry. |
2295 // R0: receiver | 2295 // R0: receiver |
2296 void StubCode::GenerateMonomorphicMissStub(Assembler* assembler) { | 2296 void StubCode::GenerateMonomorphicMissStub(Assembler* assembler) { |
| 2297 __ ldr(CODE_REG, Address(THR, Thread::monomorphic_miss_stub_offset())); |
2297 __ EnterStubFrame(); | 2298 __ EnterStubFrame(); |
2298 __ Push(R0); // Preserve receiver. | 2299 __ Push(R0); // Preserve receiver. |
2299 | 2300 |
2300 __ Push(ZR); // Result slot. | 2301 __ Push(ZR); // Result slot. |
2301 __ Push(R0); // Arg0: Receiver | 2302 __ Push(R0); // Arg0: Receiver |
2302 __ CallRuntime(kMonomorphicMissRuntimeEntry, 1); | 2303 __ CallRuntime(kMonomorphicMissRuntimeEntry, 1); |
2303 __ Drop(1); | 2304 __ Drop(1); |
2304 __ Pop(R5); // result = IC | 2305 __ Pop(R5); // result = IC |
2305 | 2306 |
2306 __ Pop(R0); // Restore receiver. | 2307 __ Pop(R0); // Restore receiver. |
2307 __ LeaveStubFrame(); | 2308 __ LeaveStubFrame(); |
2308 | 2309 |
2309 __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); | 2310 __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); |
2310 __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); | 2311 __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); |
2311 __ br(R1); | 2312 __ br(R1); |
2312 } | 2313 } |
2313 | 2314 |
2314 | 2315 |
2315 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2316 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
2316 __ brk(0); | 2317 __ brk(0); |
2317 } | 2318 } |
2318 | 2319 |
2319 } // namespace dart | 2320 } // namespace dart |
2320 | 2321 |
2321 #endif // defined TARGET_ARCH_ARM64 | 2322 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |