| 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 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 __ leaq(RCX, FieldAddress(RAX, Instance::NextFieldOffset())); | 1099 __ leaq(RCX, FieldAddress(RAX, Instance::NextFieldOffset())); |
| 1100 // Loop until the whole object is initialized. | 1100 // Loop until the whole object is initialized. |
| 1101 // RAX: new object (tagged). | 1101 // RAX: new object (tagged). |
| 1102 // RBX: next object start. | 1102 // RBX: next object start. |
| 1103 // RCX: next word to be initialized. | 1103 // RCX: next word to be initialized. |
| 1104 // RDX: new object type arguments (if is_cls_parameterized). | 1104 // RDX: new object type arguments (if is_cls_parameterized). |
| 1105 Label init_loop; | 1105 Label init_loop; |
| 1106 Label done; | 1106 Label done; |
| 1107 __ Bind(&init_loop); | 1107 __ Bind(&init_loop); |
| 1108 __ cmpq(RCX, RBX); | 1108 __ cmpq(RCX, RBX); |
| 1109 __ j(ABOVE_EQUAL, &done, Assembler::kNearJump); | 1109 #if defined(DEBUG) |
| 1110 static const bool kJumpLength = Assembler::kFarJump; |
| 1111 #else |
| 1112 static const bool kJumpLength = Assembler::kNearJump; |
| 1113 #endif // DEBUG |
| 1114 __ j(ABOVE_EQUAL, &done, kJumpLength); |
| 1110 __ InitializeFieldNoBarrier(RAX, Address(RCX, 0), R12); | 1115 __ InitializeFieldNoBarrier(RAX, Address(RCX, 0), R12); |
| 1111 __ addq(RCX, Immediate(kWordSize)); | 1116 __ addq(RCX, Immediate(kWordSize)); |
| 1112 __ jmp(&init_loop, Assembler::kNearJump); | 1117 __ jmp(&init_loop, Assembler::kNearJump); |
| 1113 __ Bind(&done); | 1118 __ Bind(&done); |
| 1114 } | 1119 } |
| 1115 if (is_cls_parameterized) { | 1120 if (is_cls_parameterized) { |
| 1116 // RDX: new object type arguments. | 1121 // RDX: new object type arguments. |
| 1117 // Set the type arguments in the new object. | 1122 // Set the type arguments in the new object. |
| 1118 intptr_t offset = cls.type_arguments_field_offset(); | 1123 intptr_t offset = cls.type_arguments_field_offset(); |
| 1119 __ InitializeFieldNoBarrier(RAX, FieldAddress(RAX, offset), RDX); | 1124 __ InitializeFieldNoBarrier(RAX, FieldAddress(RAX, offset), RDX); |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2088 | 2093 |
| 2089 __ movq(left, Address(RSP, 2 * kWordSize)); | 2094 __ movq(left, Address(RSP, 2 * kWordSize)); |
| 2090 __ movq(right, Address(RSP, 1 * kWordSize)); | 2095 __ movq(right, Address(RSP, 1 * kWordSize)); |
| 2091 GenerateIdenticalWithNumberCheckStub(assembler, left, right); | 2096 GenerateIdenticalWithNumberCheckStub(assembler, left, right); |
| 2092 __ ret(); | 2097 __ ret(); |
| 2093 } | 2098 } |
| 2094 | 2099 |
| 2095 } // namespace dart | 2100 } // namespace dart |
| 2096 | 2101 |
| 2097 #endif // defined TARGET_ARCH_X64 | 2102 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |