| 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 2168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 __ LoadIsolate(R2); | 2179 __ LoadIsolate(R2); |
| 2180 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); | 2180 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); |
| 2181 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); | 2181 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); |
| 2182 __ br(R1); | 2182 __ br(R1); |
| 2183 } | 2183 } |
| 2184 | 2184 |
| 2185 | 2185 |
| 2186 // Called from switchable IC calls. | 2186 // Called from switchable IC calls. |
| 2187 // R0: receiver | 2187 // R0: receiver |
| 2188 // R5: SingleTargetCache | 2188 // R5: SingleTargetCache |
| 2189 void StubCode::GenerateUnlinkedCallStub(Assembler* assembler) { |
| 2190 __ NoMonomorphicCheckedEntry(); |
| 2191 |
| 2192 __ EnterStubFrame(); |
| 2193 __ Push(R0); // Preserve receiver. |
| 2194 |
| 2195 __ PushObject(Object::null_object()); // Result. |
| 2196 __ Push(R0); // Arg0: Receiver |
| 2197 __ Push(R5); // Arg1: UnlinkedCall |
| 2198 __ CallRuntime(kUnlinkedCallRuntimeEntry, 2); |
| 2199 __ Drop(2); |
| 2200 __ Pop(R5); // result = IC |
| 2201 |
| 2202 __ Pop(R0); // Restore receiver. |
| 2203 __ LeaveStubFrame(); |
| 2204 |
| 2205 __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); |
| 2206 __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); |
| 2207 __ br(R1); |
| 2208 } |
| 2209 |
| 2210 |
| 2211 // Called from switchable IC calls. |
| 2212 // R0: receiver |
| 2213 // R5: SingleTargetCache |
| 2189 // Passed to target: | 2214 // Passed to target: |
| 2190 // CODE_REG: target Code object | 2215 // CODE_REG: target Code object |
| 2191 void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) { | 2216 void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) { |
| 2192 __ NoMonomorphicCheckedEntry(); | 2217 __ NoMonomorphicCheckedEntry(); |
| 2193 | 2218 |
| 2194 Label miss; | 2219 Label miss; |
| 2195 | 2220 |
| 2196 __ LoadClassIdMayBeSmi(R1, R0); | 2221 __ LoadClassIdMayBeSmi(R1, R0); |
| 2197 __ ldr(R2, FieldAddress(R5, SingleTargetCache::lower_limit_offset()), | 2222 __ ldr(R2, FieldAddress(R5, SingleTargetCache::lower_limit_offset()), |
| 2198 kUnsignedWord); | 2223 kUnsignedWord); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2248 } | 2273 } |
| 2249 | 2274 |
| 2250 | 2275 |
| 2251 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2276 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
| 2252 __ brk(0); | 2277 __ brk(0); |
| 2253 } | 2278 } |
| 2254 | 2279 |
| 2255 } // namespace dart | 2280 } // namespace dart |
| 2256 | 2281 |
| 2257 #endif // defined TARGET_ARCH_ARM64 | 2282 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |