| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_DBC. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. |
| 6 #if defined(TARGET_ARCH_DBC) | 6 #if defined(TARGET_ARCH_DBC) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 } | 1021 } |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 | 1024 |
| 1025 EMIT_NATIVE_CODE(StoreInstanceField, 2) { | 1025 EMIT_NATIVE_CODE(StoreInstanceField, 2) { |
| 1026 ASSERT(!HasTemp()); | 1026 ASSERT(!HasTemp()); |
| 1027 ASSERT(offset_in_bytes() % kWordSize == 0); | 1027 ASSERT(offset_in_bytes() % kWordSize == 0); |
| 1028 if (compiler->is_optimizing()) { | 1028 if (compiler->is_optimizing()) { |
| 1029 const Register value = locs()->in(1).reg(); | 1029 const Register value = locs()->in(1).reg(); |
| 1030 const Register instance = locs()->in(0).reg(); | 1030 const Register instance = locs()->in(0).reg(); |
| 1031 __ StoreField(instance, offset_in_bytes() / kWordSize, value); | 1031 if (Utils::IsInt(8, offset_in_bytes() / kWordSize)) { |
| 1032 __ StoreField(instance, offset_in_bytes() / kWordSize, value); |
| 1033 } else { |
| 1034 __ StoreFieldExt(instance, value); |
| 1035 __ Nop(offset_in_bytes() / kWordSize); |
| 1036 } |
| 1032 } else { | 1037 } else { |
| 1033 __ StoreFieldTOS(offset_in_bytes() / kWordSize); | 1038 __ StoreFieldTOS(offset_in_bytes() / kWordSize); |
| 1034 } | 1039 } |
| 1035 } | 1040 } |
| 1036 | 1041 |
| 1037 | 1042 |
| 1038 EMIT_NATIVE_CODE(LoadField, 1, Location::RequiresRegister()) { | 1043 EMIT_NATIVE_CODE(LoadField, 1, Location::RequiresRegister()) { |
| 1039 ASSERT(offset_in_bytes() % kWordSize == 0); | 1044 ASSERT(offset_in_bytes() % kWordSize == 0); |
| 1040 if (compiler->is_optimizing()) { | 1045 if (compiler->is_optimizing()) { |
| 1041 const Register result = locs()->out(0).reg(); | 1046 const Register result = locs()->out(0).reg(); |
| 1042 const Register instance = locs()->in(0).reg(); | 1047 const Register instance = locs()->in(0).reg(); |
| 1043 __ LoadField(result, instance, offset_in_bytes() / kWordSize); | 1048 if (Utils::IsInt(8, offset_in_bytes() / kWordSize)) { |
| 1049 __ LoadField(result, instance, offset_in_bytes() / kWordSize); |
| 1050 } else { |
| 1051 __ LoadFieldExt(result, instance); |
| 1052 __ Nop(offset_in_bytes() / kWordSize); |
| 1053 } |
| 1044 } else { | 1054 } else { |
| 1045 __ LoadFieldTOS(offset_in_bytes() / kWordSize); | 1055 __ LoadFieldTOS(offset_in_bytes() / kWordSize); |
| 1046 } | 1056 } |
| 1047 } | 1057 } |
| 1048 | 1058 |
| 1049 | 1059 |
| 1050 EMIT_NATIVE_CODE(LoadUntagged, 1, Location::RequiresRegister()) { | 1060 EMIT_NATIVE_CODE(LoadUntagged, 1, Location::RequiresRegister()) { |
| 1051 const Register obj = locs()->in(0).reg(); | 1061 const Register obj = locs()->in(0).reg(); |
| 1052 const Register result = locs()->out(0).reg(); | 1062 const Register result = locs()->out(0).reg(); |
| 1053 if (object()->definition()->representation() == kUntagged) { | 1063 if (object()->definition()->representation() == kUntagged) { |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 __ IfULe(length, index); | 1893 __ IfULe(length, index); |
| 1884 compiler->EmitDeopt(deopt_id(), | 1894 compiler->EmitDeopt(deopt_id(), |
| 1885 ICData::kDeoptCheckArrayBound, | 1895 ICData::kDeoptCheckArrayBound, |
| 1886 (generalized_ ? ICData::kGeneralized : 0) | | 1896 (generalized_ ? ICData::kGeneralized : 0) | |
| 1887 (licm_hoisted_ ? ICData::kHoisted : 0)); | 1897 (licm_hoisted_ ? ICData::kHoisted : 0)); |
| 1888 } | 1898 } |
| 1889 | 1899 |
| 1890 } // namespace dart | 1900 } // namespace dart |
| 1891 | 1901 |
| 1892 #endif // defined TARGET_ARCH_DBC | 1902 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |