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 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 // RCX: untagged cid of instance (RAX). | 1546 // RCX: untagged cid of instance (RAX). |
1547 __ cmpq(RCX, Immediate(kClosureCid)); | 1547 __ cmpq(RCX, Immediate(kClosureCid)); |
1548 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Instance is a closure. | 1548 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Instance is a closure. |
1549 | 1549 |
1550 __ LoadClassById(RDI, RCX); | 1550 __ LoadClassById(RDI, RCX); |
1551 // RDI: class of instance (RAX). | 1551 // RDI: class of instance (RAX). |
1552 | 1552 |
1553 __ movzxw(RCX, FieldAddress(RDI, Class::num_type_arguments_offset())); | 1553 __ movzxw(RCX, FieldAddress(RDI, Class::num_type_arguments_offset())); |
1554 __ cmpq(RCX, Immediate(0)); | 1554 __ cmpq(RCX, Immediate(0)); |
1555 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); | 1555 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); |
1556 __ movq(RAX, FieldAddress(RDI, Class::canonical_types_offset())); | 1556 __ movq(RAX, FieldAddress(RDI, Class::canonical_type_offset())); |
1557 __ CompareObject(RAX, Object::null_object()); | 1557 __ CompareObject(RAX, Object::null_object()); |
1558 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Not yet set. | 1558 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Not yet set. |
1559 __ ret(); | 1559 __ ret(); |
1560 | 1560 |
1561 __ Bind(&fall_through); | 1561 __ Bind(&fall_through); |
1562 } | 1562 } |
1563 | 1563 |
1564 | 1564 |
1565 void Intrinsifier::String_getHashCode(Assembler* assembler) { | 1565 void Intrinsifier::String_getHashCode(Assembler* assembler) { |
1566 Label fall_through; | 1566 Label fall_through; |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2108 __ Bind(&true_label); | 2108 __ Bind(&true_label); |
2109 __ LoadObject(RAX, Bool::True()); | 2109 __ LoadObject(RAX, Bool::True()); |
2110 __ ret(); | 2110 __ ret(); |
2111 } | 2111 } |
2112 | 2112 |
2113 #undef __ | 2113 #undef __ |
2114 | 2114 |
2115 } // namespace dart | 2115 } // namespace dart |
2116 | 2116 |
2117 #endif // defined TARGET_ARCH_X64 | 2117 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |