| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1743 // Used to check class and type arguments. Arguments passed in registers: | 1743 // Used to check class and type arguments. Arguments passed in registers: |
| 1744 // LR: return address. | 1744 // LR: return address. |
| 1745 // R0: instance (must be preserved). | 1745 // R0: instance (must be preserved). |
| 1746 // R1: instantiator type arguments or NULL. | 1746 // R1: instantiator type arguments or NULL. |
| 1747 // R2: cache array. | 1747 // R2: cache array. |
| 1748 // Result in R1: null -> not found, otherwise result (true or false). | 1748 // Result in R1: null -> not found, otherwise result (true or false). |
| 1749 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { | 1749 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { |
| 1750 ASSERT((1 <= n) && (n <= 3)); | 1750 ASSERT((1 <= n) && (n <= 3)); |
| 1751 if (n > 1) { | 1751 if (n > 1) { |
| 1752 // Get instance type arguments. | 1752 // Get instance type arguments. |
| 1753 __ LoadClass(R3, R0, R4); | 1753 __ LoadClass(R3, R0, R4, Isolate::Current()); |
| 1754 // Compute instance type arguments into R4. | 1754 // Compute instance type arguments into R4. |
| 1755 Label has_no_type_arguments; | 1755 Label has_no_type_arguments; |
| 1756 __ LoadImmediate(R4, reinterpret_cast<intptr_t>(Object::null())); | 1756 __ LoadImmediate(R4, reinterpret_cast<intptr_t>(Object::null())); |
| 1757 __ ldr(R5, FieldAddress(R3, | 1757 __ ldr(R5, FieldAddress(R3, |
| 1758 Class::type_arguments_field_offset_in_words_offset())); | 1758 Class::type_arguments_field_offset_in_words_offset())); |
| 1759 __ CompareImmediate(R5, Class::kNoTypeArguments); | 1759 __ CompareImmediate(R5, Class::kNoTypeArguments); |
| 1760 __ b(&has_no_type_arguments, EQ); | 1760 __ b(&has_no_type_arguments, EQ); |
| 1761 __ add(R5, R0, Operand(R5, LSL, 2)); | 1761 __ add(R5, R0, Operand(R5, LSL, 2)); |
| 1762 __ ldr(R4, FieldAddress(R5, 0)); | 1762 __ ldr(R4, FieldAddress(R5, 0)); |
| 1763 __ Bind(&has_no_type_arguments); | 1763 __ Bind(&has_no_type_arguments); |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2019 const Register right = R0; | 2019 const Register right = R0; |
| 2020 __ ldr(left, Address(SP, 1 * kWordSize)); | 2020 __ ldr(left, Address(SP, 1 * kWordSize)); |
| 2021 __ ldr(right, Address(SP, 0 * kWordSize)); | 2021 __ ldr(right, Address(SP, 0 * kWordSize)); |
| 2022 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2022 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 2023 __ Ret(); | 2023 __ Ret(); |
| 2024 } | 2024 } |
| 2025 | 2025 |
| 2026 } // namespace dart | 2026 } // namespace dart |
| 2027 | 2027 |
| 2028 #endif // defined TARGET_ARCH_ARM | 2028 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |