| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 const Object& constant = locs()->in(2).constant(); | 940 const Object& constant = locs()->in(2).constant(); |
| 941 __ StoreIntoObjectNoBarrier(array, field_address, constant); | 941 __ StoreIntoObjectNoBarrier(array, field_address, constant); |
| 942 } else { | 942 } else { |
| 943 Register value = locs()->in(2).reg(); | 943 Register value = locs()->in(2).reg(); |
| 944 __ StoreIntoObjectNoBarrier(array, field_address, value); | 944 __ StoreIntoObjectNoBarrier(array, field_address, value); |
| 945 } | 945 } |
| 946 } | 946 } |
| 947 } | 947 } |
| 948 | 948 |
| 949 | 949 |
| 950 LocationSummary* LoadInstanceFieldInstr::MakeLocationSummary() const { | |
| 951 // TODO(fschneider): For this instruction the input register may be | |
| 952 // reused for the result (but is not required to) because the input | |
| 953 // is not used after the result is defined. We should consider adding | |
| 954 // this information to the input policy. | |
| 955 return LocationSummary::Make(1, | |
| 956 Location::RequiresRegister(), | |
| 957 LocationSummary::kNoCall); | |
| 958 } | |
| 959 | |
| 960 | |
| 961 void LoadInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | |
| 962 Register instance_reg = locs()->in(0).reg(); | |
| 963 Register result_reg = locs()->out().reg(); | |
| 964 __ movl(result_reg, FieldAddress(instance_reg, field().Offset())); | |
| 965 } | |
| 966 | |
| 967 | |
| 968 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary() const { | 950 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary() const { |
| 969 const intptr_t kNumInputs = 2; | 951 const intptr_t kNumInputs = 2; |
| 970 const intptr_t num_temps = 0; | 952 const intptr_t num_temps = 0; |
| 971 LocationSummary* summary = | 953 LocationSummary* summary = |
| 972 new LocationSummary(kNumInputs, num_temps, LocationSummary::kNoCall); | 954 new LocationSummary(kNumInputs, num_temps, LocationSummary::kNoCall); |
| 973 summary->set_in(0, Location::RequiresRegister()); | 955 summary->set_in(0, Location::RequiresRegister()); |
| 974 summary->set_in(1, | 956 summary->set_in(1, |
| 975 value()->NeedsStoreBuffer() ? Location::WritableRegister() | 957 value()->NeedsStoreBuffer() ? Location::WritableRegister() |
| 976 : Location::RequiresRegister()); | 958 : Location::RequiresRegister()); |
| 977 return summary; | 959 return summary; |
| (...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2279 __ j(ABOVE_EQUAL, deopt); | 2261 __ j(ABOVE_EQUAL, deopt); |
| 2280 } | 2262 } |
| 2281 } | 2263 } |
| 2282 | 2264 |
| 2283 | 2265 |
| 2284 } // namespace dart | 2266 } // namespace dart |
| 2285 | 2267 |
| 2286 #undef __ | 2268 #undef __ |
| 2287 | 2269 |
| 2288 #endif // defined TARGET_ARCH_X64 | 2270 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |