| 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" // Needed here to get TARGET_ARCH_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1607 __ csel(R0, TMP, R0, EQ); | 1607 __ csel(R0, TMP, R0, EQ); |
| 1608 __ ret(); | 1608 __ ret(); |
| 1609 } | 1609 } |
| 1610 | 1610 |
| 1611 | 1611 |
| 1612 // Return type quickly for simple types (not parameterized and not signature). | 1612 // Return type quickly for simple types (not parameterized and not signature). |
| 1613 void Intrinsifier::ObjectRuntimeType(Assembler* assembler) { | 1613 void Intrinsifier::ObjectRuntimeType(Assembler* assembler) { |
| 1614 Label fall_through; | 1614 Label fall_through; |
| 1615 __ ldr(R0, Address(SP, 0 * kWordSize)); | 1615 __ ldr(R0, Address(SP, 0 * kWordSize)); |
| 1616 __ LoadClassIdMayBeSmi(R1, R0); | 1616 __ LoadClassIdMayBeSmi(R1, R0); |
| 1617 __ CompareImmediate(R1, kClosureCid); |
| 1618 __ b(&fall_through, EQ); // Instance is a closure. |
| 1617 __ LoadClassById(R2, R1); | 1619 __ LoadClassById(R2, R1); |
| 1618 // R2: class of instance (R0). | 1620 // R2: class of instance (R0). |
| 1619 __ ldr(R3, FieldAddress(R2, Class::signature_function_offset())); | |
| 1620 __ CompareObject(R3, Object::null_object()); | |
| 1621 __ b(&fall_through, NE); | |
| 1622 | 1621 |
| 1623 __ ldr(R3, FieldAddress(R2, Class::num_type_arguments_offset()), kHalfword); | 1622 __ ldr(R3, FieldAddress(R2, Class::num_type_arguments_offset()), kHalfword); |
| 1624 __ CompareImmediate(R3, 0); | 1623 __ CompareImmediate(R3, 0); |
| 1625 __ b(&fall_through, NE); | 1624 __ b(&fall_through, NE); |
| 1626 | 1625 |
| 1627 __ ldr(R0, FieldAddress(R2, Class::canonical_types_offset())); | 1626 __ ldr(R0, FieldAddress(R2, Class::canonical_types_offset())); |
| 1628 __ CompareObject(R0, Object::null_object()); | 1627 __ CompareObject(R0, Object::null_object()); |
| 1629 __ b(&fall_through, EQ); | 1628 __ b(&fall_through, EQ); |
| 1630 __ ret(); | 1629 __ ret(); |
| 1631 | 1630 |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2198 | 2197 |
| 2199 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2198 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
| 2200 __ LoadIsolate(R0); | 2199 __ LoadIsolate(R0); |
| 2201 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); | 2200 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); |
| 2202 __ ret(); | 2201 __ ret(); |
| 2203 } | 2202 } |
| 2204 | 2203 |
| 2205 } // namespace dart | 2204 } // namespace dart |
| 2206 | 2205 |
| 2207 #endif // defined TARGET_ARCH_ARM64 | 2206 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |