| 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 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1808 // R1: instantiator type arguments or NULL. | 1808 // R1: instantiator type arguments or NULL. |
| 1809 // R2: SubtypeTestCache. | 1809 // R2: SubtypeTestCache. |
| 1810 // R3: instance class id. | 1810 // R3: instance class id. |
| 1811 // R4: instance type arguments (null if none), used only if n > 1. | 1811 // R4: instance type arguments (null if none), used only if n > 1. |
| 1812 __ LoadFieldFromOffset(R2, R2, SubtypeTestCache::cache_offset()); | 1812 __ LoadFieldFromOffset(R2, R2, SubtypeTestCache::cache_offset()); |
| 1813 __ AddImmediate(R2, R2, Array::data_offset() - kHeapObjectTag); | 1813 __ AddImmediate(R2, R2, Array::data_offset() - kHeapObjectTag); |
| 1814 | 1814 |
| 1815 Label loop, found, not_found, next_iteration; | 1815 Label loop, found, not_found, next_iteration; |
| 1816 // R2: entry start. | 1816 // R2: entry start. |
| 1817 // R3: instance class id. | 1817 // R3: instance class id. |
| 1818 // R4: instance type arguments. | 1818 // R4: instance type arguments (still null if closure). |
| 1819 __ SmiTag(R3); | 1819 __ SmiTag(R3); |
| 1820 __ CompareImmediate(R3, Smi::RawValue(kClosureCid)); | 1820 __ CompareImmediate(R3, Smi::RawValue(kClosureCid)); |
| 1821 __ b(&loop, NE); | 1821 __ b(&loop, NE); |
| 1822 __ LoadFieldFromOffset(R4, R0, Closure::instantiator_offset()); |
| 1822 __ LoadFieldFromOffset(R3, R0, Closure::function_offset()); | 1823 __ LoadFieldFromOffset(R3, R0, Closure::function_offset()); |
| 1823 // R3: instance class id as Smi or function. | 1824 // R3: instance class id as Smi or function. |
| 1824 __ Bind(&loop); | 1825 __ Bind(&loop); |
| 1825 __ LoadFromOffset(R5, R2, | 1826 __ LoadFromOffset(R5, R2, |
| 1826 kWordSize * SubtypeTestCache::kInstanceClassIdOrFunction); | 1827 kWordSize * SubtypeTestCache::kInstanceClassIdOrFunction); |
| 1827 __ CompareObject(R5, Object::null_object()); | 1828 __ CompareObject(R5, Object::null_object()); |
| 1828 __ b(¬_found, EQ); | 1829 __ b(¬_found, EQ); |
| 1829 __ CompareRegisters(R5, R3); | 1830 __ CompareRegisters(R5, R3); |
| 1830 if (n == 1) { | 1831 if (n == 1) { |
| 1831 __ b(&found, EQ); | 1832 __ b(&found, EQ); |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2334 } | 2335 } |
| 2335 | 2336 |
| 2336 | 2337 |
| 2337 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { | 2338 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { |
| 2338 __ brk(0); | 2339 __ brk(0); |
| 2339 } | 2340 } |
| 2340 | 2341 |
| 2341 } // namespace dart | 2342 } // namespace dart |
| 2342 | 2343 |
| 2343 #endif // defined TARGET_ARCH_ARM64 | 2344 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |