| 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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 __ movq(RDI, Immediate(0)); | 699 __ movq(RDI, Immediate(0)); |
| 700 __ Bind(&done); | 700 __ Bind(&done); |
| 701 | 701 |
| 702 // Get the class index and insert it into the tags. | 702 // Get the class index and insert it into the tags. |
| 703 __ orq(RDI, Immediate(RawObject::ClassIdTag::encode(cid))); | 703 __ orq(RDI, Immediate(RawObject::ClassIdTag::encode(cid))); |
| 704 __ movq(FieldAddress(RAX, Array::tags_offset()), RDI); // Tags. | 704 __ movq(FieldAddress(RAX, Array::tags_offset()), RDI); // Tags. |
| 705 } | 705 } |
| 706 | 706 |
| 707 // RAX: new object start as a tagged pointer. | 707 // RAX: new object start as a tagged pointer. |
| 708 // Store the type argument field. | 708 // Store the type argument field. |
| 709 // No generetional barrier needed, since we store into a new object. | 709 // No generational barrier needed, since we store into a new object. |
| 710 __ StoreIntoObjectNoBarrier( | 710 __ StoreIntoObjectNoBarrier( |
| 711 RAX, FieldAddress(RAX, Array::type_arguments_offset()), RBX); | 711 RAX, FieldAddress(RAX, Array::type_arguments_offset()), RBX); |
| 712 | 712 |
| 713 // Set the length field. | 713 // Set the length field. |
| 714 __ StoreIntoObjectNoBarrier(RAX, FieldAddress(RAX, Array::length_offset()), | 714 __ StoreIntoObjectNoBarrier(RAX, FieldAddress(RAX, Array::length_offset()), |
| 715 R10); | 715 R10); |
| 716 | 716 |
| 717 // Initialize all array elements to raw_null. | 717 // Initialize all array elements to raw_null. |
| 718 // RAX: new object start as a tagged pointer. | 718 // RAX: new object start as a tagged pointer. |
| 719 // RCX: new object end address. | 719 // RCX: new object end address. |
| (...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2138 FieldAddress(RBX, MegamorphicCache::arguments_descriptor_offset())); | 2138 FieldAddress(RBX, MegamorphicCache::arguments_descriptor_offset())); |
| 2139 __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset())); | 2139 __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset())); |
| 2140 __ movq(CODE_REG, FieldAddress(RAX, Function::code_offset())); | 2140 __ movq(CODE_REG, FieldAddress(RAX, Function::code_offset())); |
| 2141 __ jmp(RCX); | 2141 __ jmp(RCX); |
| 2142 | 2142 |
| 2143 // Probe failed, check if it is a miss. | 2143 // Probe failed, check if it is a miss. |
| 2144 __ Bind(&probe_failed); | 2144 __ Bind(&probe_failed); |
| 2145 __ cmpq(FieldAddress(RDI, RCX, TIMES_8, base), Immediate(kIllegalCid)); | 2145 __ cmpq(FieldAddress(RDI, RCX, TIMES_8, base), Immediate(kIllegalCid)); |
| 2146 __ j(ZERO, &load_target, Assembler::kNearJump); | 2146 __ j(ZERO, &load_target, Assembler::kNearJump); |
| 2147 | 2147 |
| 2148 // Try next extry in the table. | 2148 // Try next entry in the table. |
| 2149 __ AddImmediate(RCX, Immediate(Smi::RawValue(1))); | 2149 __ AddImmediate(RCX, Immediate(Smi::RawValue(1))); |
| 2150 __ jmp(&loop); | 2150 __ jmp(&loop); |
| 2151 | 2151 |
| 2152 // Load cid for the Smi case. | 2152 // Load cid for the Smi case. |
| 2153 __ Bind(&smi_case); | 2153 __ Bind(&smi_case); |
| 2154 __ movq(RAX, Immediate(kSmiCid)); | 2154 __ movq(RAX, Immediate(kSmiCid)); |
| 2155 __ jmp(&cid_loaded); | 2155 __ jmp(&cid_loaded); |
| 2156 } | 2156 } |
| 2157 | 2157 |
| 2158 | 2158 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2323 } | 2323 } |
| 2324 | 2324 |
| 2325 | 2325 |
| 2326 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { | 2326 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { |
| 2327 __ int3(); | 2327 __ int3(); |
| 2328 } | 2328 } |
| 2329 | 2329 |
| 2330 } // namespace dart | 2330 } // namespace dart |
| 2331 | 2331 |
| 2332 #endif // defined TARGET_ARCH_X64 | 2332 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |