| 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_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1776 // TOS + 3: SubtypeTestCache. | 1776 // TOS + 3: SubtypeTestCache. |
| 1777 // Result in RCX: null -> not found, otherwise result (true or false). | 1777 // Result in RCX: null -> not found, otherwise result (true or false). |
| 1778 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { | 1778 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { |
| 1779 ASSERT((1 <= n) && (n <= 3)); | 1779 ASSERT((1 <= n) && (n <= 3)); |
| 1780 const intptr_t kInstantiatorTypeArgumentsInBytes = 1 * kWordSize; | 1780 const intptr_t kInstantiatorTypeArgumentsInBytes = 1 * kWordSize; |
| 1781 const intptr_t kInstanceOffsetInBytes = 2 * kWordSize; | 1781 const intptr_t kInstanceOffsetInBytes = 2 * kWordSize; |
| 1782 const intptr_t kCacheOffsetInBytes = 3 * kWordSize; | 1782 const intptr_t kCacheOffsetInBytes = 3 * kWordSize; |
| 1783 __ movq(RAX, Address(RSP, kInstanceOffsetInBytes)); | 1783 __ movq(RAX, Address(RSP, kInstanceOffsetInBytes)); |
| 1784 __ LoadObject(R12, Object::null_object(), PP); | 1784 __ LoadObject(R12, Object::null_object(), PP); |
| 1785 if (n > 1) { | 1785 if (n > 1) { |
| 1786 __ LoadClass(R10, RAX); | 1786 __ LoadClass(R10, RAX, Isolate::Current(), kNoRegister); |
| 1787 // Compute instance type arguments into R13. | 1787 // Compute instance type arguments into R13. |
| 1788 Label has_no_type_arguments; | 1788 Label has_no_type_arguments; |
| 1789 __ movq(R13, R12); | 1789 __ movq(R13, R12); |
| 1790 __ movl(RDI, FieldAddress(R10, | 1790 __ movl(RDI, FieldAddress(R10, |
| 1791 Class::type_arguments_field_offset_in_words_offset())); | 1791 Class::type_arguments_field_offset_in_words_offset())); |
| 1792 __ cmpl(RDI, Immediate(Class::kNoTypeArguments)); | 1792 __ cmpl(RDI, Immediate(Class::kNoTypeArguments)); |
| 1793 __ j(EQUAL, &has_no_type_arguments, Assembler::kNearJump); | 1793 __ j(EQUAL, &has_no_type_arguments, Assembler::kNearJump); |
| 1794 __ movq(R13, FieldAddress(RAX, RDI, TIMES_8, 0)); | 1794 __ movq(R13, FieldAddress(RAX, RDI, TIMES_8, 0)); |
| 1795 __ Bind(&has_no_type_arguments); | 1795 __ Bind(&has_no_type_arguments); |
| 1796 } | 1796 } |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2055 | 2055 |
| 2056 __ movq(left, Address(RSP, 2 * kWordSize)); | 2056 __ movq(left, Address(RSP, 2 * kWordSize)); |
| 2057 __ movq(right, Address(RSP, 1 * kWordSize)); | 2057 __ movq(right, Address(RSP, 1 * kWordSize)); |
| 2058 GenerateIdenticalWithNumberCheckStub(assembler, left, right); | 2058 GenerateIdenticalWithNumberCheckStub(assembler, left, right); |
| 2059 __ ret(); | 2059 __ ret(); |
| 2060 } | 2060 } |
| 2061 | 2061 |
| 2062 } // namespace dart | 2062 } // namespace dart |
| 2063 | 2063 |
| 2064 #endif // defined TARGET_ARCH_X64 | 2064 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |