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" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
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 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 // RCX: untagged cid of instance (RAX). | 1545 // RCX: untagged cid of instance (RAX). |
1546 __ cmpq(RCX, Immediate(kClosureCid)); | 1546 __ cmpq(RCX, Immediate(kClosureCid)); |
1547 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Instance is a closure. | 1547 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Instance is a closure. |
1548 | 1548 |
1549 __ LoadClassById(RDI, RCX); | 1549 __ LoadClassById(RDI, RCX); |
1550 // RDI: class of instance (RAX). | 1550 // RDI: class of instance (RAX). |
1551 | 1551 |
1552 __ movzxw(RCX, FieldAddress(RDI, Class::num_type_arguments_offset())); | 1552 __ movzxw(RCX, FieldAddress(RDI, Class::num_type_arguments_offset())); |
1553 __ cmpq(RCX, Immediate(0)); | 1553 __ cmpq(RCX, Immediate(0)); |
1554 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); | 1554 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); |
1555 __ movq(RAX, FieldAddress(RDI, Class::canonical_types_offset())); | 1555 __ movq(RAX, FieldAddress(RDI, Class::canonical_type_offset())); |
1556 __ CompareObject(RAX, Object::null_object()); | 1556 __ CompareObject(RAX, Object::null_object()); |
1557 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Not yet set. | 1557 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Not yet set. |
1558 __ ret(); | 1558 __ ret(); |
1559 | 1559 |
1560 __ Bind(&fall_through); | 1560 __ Bind(&fall_through); |
1561 } | 1561 } |
1562 | 1562 |
1563 | 1563 |
1564 void Intrinsifier::String_getHashCode(Assembler* assembler) { | 1564 void Intrinsifier::String_getHashCode(Assembler* assembler) { |
1565 Label fall_through; | 1565 Label fall_through; |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2084 __ LoadIsolate(RAX); | 2084 __ LoadIsolate(RAX); |
2085 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); | 2085 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); |
2086 __ ret(); | 2086 __ ret(); |
2087 } | 2087 } |
2088 | 2088 |
2089 #undef __ | 2089 #undef __ |
2090 | 2090 |
2091 } // namespace dart | 2091 } // namespace dart |
2092 | 2092 |
2093 #endif // defined TARGET_ARCH_X64 | 2093 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |