OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 | 1754 |
1755 | 1755 |
1756 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(Zone* zone, | 1756 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(Zone* zone, |
1757 bool opt) const { | 1757 bool opt) const { |
1758 const intptr_t kNumInputs = 2; | 1758 const intptr_t kNumInputs = 2; |
1759 const intptr_t kNumTemps = | 1759 const intptr_t kNumTemps = |
1760 (IsUnboxedStore() && opt) ? 2 : | 1760 (IsUnboxedStore() && opt) ? 2 : |
1761 ((IsPotentialUnboxedStore()) ? 2 : 0); | 1761 ((IsPotentialUnboxedStore()) ? 2 : 0); |
1762 LocationSummary* summary = new(zone) LocationSummary( | 1762 LocationSummary* summary = new(zone) LocationSummary( |
1763 zone, kNumInputs, kNumTemps, | 1763 zone, kNumInputs, kNumTemps, |
1764 ((IsUnboxedStore() && opt && is_potential_unboxed_initialization_) || | 1764 ((IsUnboxedStore() && opt && is_initialization()) || |
1765 IsPotentialUnboxedStore()) | 1765 IsPotentialUnboxedStore()) |
1766 ? LocationSummary::kCallOnSlowPath | 1766 ? LocationSummary::kCallOnSlowPath |
1767 : LocationSummary::kNoCall); | 1767 : LocationSummary::kNoCall); |
1768 | 1768 |
1769 summary->set_in(0, Location::RequiresRegister()); | 1769 summary->set_in(0, Location::RequiresRegister()); |
1770 if (IsUnboxedStore() && opt) { | 1770 if (IsUnboxedStore() && opt) { |
1771 summary->set_in(1, Location::RequiresFpuRegister()); | 1771 summary->set_in(1, Location::RequiresFpuRegister()); |
1772 summary->set_temp(0, Location::RequiresRegister()); | 1772 summary->set_temp(0, Location::RequiresRegister()); |
1773 summary->set_temp(1, Location::RequiresRegister()); | 1773 summary->set_temp(1, Location::RequiresRegister()); |
1774 } else if (IsPotentialUnboxedStore()) { | 1774 } else if (IsPotentialUnboxedStore()) { |
(...skipping 16 matching lines...) Expand all Loading... |
1791 Label skip_store; | 1791 Label skip_store; |
1792 | 1792 |
1793 const Register instance_reg = locs()->in(0).reg(); | 1793 const Register instance_reg = locs()->in(0).reg(); |
1794 | 1794 |
1795 if (IsUnboxedStore() && compiler->is_optimizing()) { | 1795 if (IsUnboxedStore() && compiler->is_optimizing()) { |
1796 const VRegister value = locs()->in(1).fpu_reg(); | 1796 const VRegister value = locs()->in(1).fpu_reg(); |
1797 const Register temp = locs()->temp(0).reg(); | 1797 const Register temp = locs()->temp(0).reg(); |
1798 const Register temp2 = locs()->temp(1).reg(); | 1798 const Register temp2 = locs()->temp(1).reg(); |
1799 const intptr_t cid = field().UnboxedFieldCid(); | 1799 const intptr_t cid = field().UnboxedFieldCid(); |
1800 | 1800 |
1801 if (is_potential_unboxed_initialization_) { | 1801 if (is_initialization()) { |
1802 const Class* cls = NULL; | 1802 const Class* cls = NULL; |
1803 switch (cid) { | 1803 switch (cid) { |
1804 case kDoubleCid: | 1804 case kDoubleCid: |
1805 cls = &compiler->double_class(); | 1805 cls = &compiler->double_class(); |
1806 break; | 1806 break; |
1807 case kFloat32x4Cid: | 1807 case kFloat32x4Cid: |
1808 cls = &compiler->float32x4_class(); | 1808 cls = &compiler->float32x4_class(); |
1809 break; | 1809 break; |
1810 case kFloat64x2Cid: | 1810 case kFloat64x2Cid: |
1811 cls = &compiler->float64x2_class(); | 1811 cls = &compiler->float64x2_class(); |
(...skipping 3905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5717 1, | 5717 1, |
5718 locs()); | 5718 locs()); |
5719 __ Drop(1); | 5719 __ Drop(1); |
5720 __ Pop(result); | 5720 __ Pop(result); |
5721 } | 5721 } |
5722 | 5722 |
5723 | 5723 |
5724 } // namespace dart | 5724 } // namespace dart |
5725 | 5725 |
5726 #endif // defined TARGET_ARCH_ARM64 | 5726 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |