Chromium Code Reviews| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1412 | 1412 |
| 1413 for (intptr_t i = 0; i < num_temps; i++) { | 1413 for (intptr_t i = 0; i < num_temps; i++) { |
| 1414 summary->set_temp(i, Location::RequiresRegister()); | 1414 summary->set_temp(i, Location::RequiresRegister()); |
| 1415 } | 1415 } |
| 1416 | 1416 |
| 1417 return summary; | 1417 return summary; |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 | 1420 |
| 1421 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1421 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1422 ASSERT(sizeof(classid_t) == 2); | |
|
siva
2015/06/12 22:08:11
Ditto here and elsewhere.
| |
| 1422 const intptr_t value_cid = value()->Type()->ToCid(); | 1423 const intptr_t value_cid = value()->Type()->ToCid(); |
| 1423 const intptr_t field_cid = field().guarded_cid(); | 1424 const intptr_t field_cid = field().guarded_cid(); |
| 1424 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; | 1425 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; |
| 1425 | 1426 |
| 1426 if (field_cid == kDynamicCid) { | 1427 if (field_cid == kDynamicCid) { |
| 1427 ASSERT(!compiler->is_optimizing()); | 1428 ASSERT(!compiler->is_optimizing()); |
| 1428 return; // Nothing to emit. | 1429 return; // Nothing to emit. |
| 1429 } | 1430 } |
| 1430 | 1431 |
| 1431 const bool emit_full_guard = | 1432 const bool emit_full_guard = |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1759 __ movl(temp, box_reg); | 1760 __ movl(temp, box_reg); |
| 1760 __ StoreIntoObject(instance_reg, | 1761 __ StoreIntoObject(instance_reg, |
| 1761 FieldAddress(instance_reg, offset), | 1762 FieldAddress(instance_reg, offset), |
| 1762 temp); | 1763 temp); |
| 1763 | 1764 |
| 1764 __ Bind(&done); | 1765 __ Bind(&done); |
| 1765 } | 1766 } |
| 1766 | 1767 |
| 1767 | 1768 |
| 1768 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1769 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1770 ASSERT(sizeof(classid_t) == 2); | |
| 1769 Label skip_store; | 1771 Label skip_store; |
| 1770 | 1772 |
| 1771 Register instance_reg = locs()->in(0).reg(); | 1773 Register instance_reg = locs()->in(0).reg(); |
| 1772 | 1774 |
| 1773 if (IsUnboxedStore() && compiler->is_optimizing()) { | 1775 if (IsUnboxedStore() && compiler->is_optimizing()) { |
| 1774 XmmRegister value = locs()->in(1).fpu_reg(); | 1776 XmmRegister value = locs()->in(1).fpu_reg(); |
| 1775 Register temp = locs()->temp(0).reg(); | 1777 Register temp = locs()->temp(0).reg(); |
| 1776 Register temp2 = locs()->temp(1).reg(); | 1778 Register temp2 = locs()->temp(1).reg(); |
| 1777 const intptr_t cid = field().UnboxedFieldCid(); | 1779 const intptr_t cid = field().UnboxedFieldCid(); |
| 1778 | 1780 |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2161 locs->set_temp(0, opt ? Location::RequiresFpuRegister() | 2163 locs->set_temp(0, opt ? Location::RequiresFpuRegister() |
| 2162 : Location::FpuRegisterLocation(XMM1)); | 2164 : Location::FpuRegisterLocation(XMM1)); |
| 2163 locs->set_temp(1, Location::RequiresRegister()); | 2165 locs->set_temp(1, Location::RequiresRegister()); |
| 2164 } | 2166 } |
| 2165 locs->set_out(0, Location::RequiresRegister()); | 2167 locs->set_out(0, Location::RequiresRegister()); |
| 2166 return locs; | 2168 return locs; |
| 2167 } | 2169 } |
| 2168 | 2170 |
| 2169 | 2171 |
| 2170 void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2172 void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2173 ASSERT(sizeof(classid_t) == 2); | |
| 2174 | |
| 2171 Register instance_reg = locs()->in(0).reg(); | 2175 Register instance_reg = locs()->in(0).reg(); |
| 2172 if (IsUnboxedLoad() && compiler->is_optimizing()) { | 2176 if (IsUnboxedLoad() && compiler->is_optimizing()) { |
| 2173 XmmRegister result = locs()->out(0).fpu_reg(); | 2177 XmmRegister result = locs()->out(0).fpu_reg(); |
| 2174 Register temp = locs()->temp(0).reg(); | 2178 Register temp = locs()->temp(0).reg(); |
| 2175 __ movl(temp, FieldAddress(instance_reg, offset_in_bytes())); | 2179 __ movl(temp, FieldAddress(instance_reg, offset_in_bytes())); |
| 2176 const intptr_t cid = field()->UnboxedFieldCid(); | 2180 const intptr_t cid = field()->UnboxedFieldCid(); |
| 2177 switch (cid) { | 2181 switch (cid) { |
| 2178 case kDoubleCid: | 2182 case kDoubleCid: |
| 2179 __ Comment("UnboxedDoubleLoadFieldInstr"); | 2183 __ Comment("UnboxedDoubleLoadFieldInstr"); |
| 2180 __ movsd(result, FieldAddress(temp, Double::value_offset())); | 2184 __ movsd(result, FieldAddress(temp, Double::value_offset())); |
| (...skipping 4698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6879 __ Drop(1); | 6883 __ Drop(1); |
| 6880 __ popl(result); | 6884 __ popl(result); |
| 6881 } | 6885 } |
| 6882 | 6886 |
| 6883 | 6887 |
| 6884 } // namespace dart | 6888 } // namespace dart |
| 6885 | 6889 |
| 6886 #undef __ | 6890 #undef __ |
| 6887 | 6891 |
| 6888 #endif // defined TARGET_ARCH_IA32 | 6892 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |