Index: runtime/vm/intermediate_language_ia32.cc |
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc |
index d27b20aea1921945bcd55f1d302755eaf05ed376..c28234b65b0964b06bd3bda6f62c0a6929a1c14d 100644 |
--- a/runtime/vm/intermediate_language_ia32.cc |
+++ b/runtime/vm/intermediate_language_ia32.cc |
@@ -920,7 +920,8 @@ LocationSummary* StoreIndexedInstr::MakeLocationSummary() const { |
new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
locs->set_in(0, Location::RequiresRegister()); |
locs->set_in(1, Location::RequiresRegister()); |
- locs->set_in(2, Location::RequiresRegister()); |
+ locs->set_in(2, value()->NeedsStoreBuffer() ? Location::WritableRegister() |
+ : Location::RequiresRegister()); |
if (receiver_type() == kGrowableObjectArrayCid) { |
locs->set_temp(0, Location::RequiresRegister()); |
} |
@@ -997,7 +998,9 @@ LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary() const { |
LocationSummary* summary = |
new LocationSummary(kNumInputs, num_temps, LocationSummary::kNoCall); |
summary->set_in(0, Location::RequiresRegister()); |
- summary->set_in(1, Location::RequiresRegister()); |
+ summary->set_in(1, |
+ value()->NeedsStoreBuffer() ? Location::WritableRegister() |
+ : Location::RequiresRegister()); |
return summary; |
} |
@@ -1031,10 +1034,9 @@ void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { |
LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); |
- locs->set_in(0, Location::RequiresRegister()); |
+ locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() |
+ : Location::RequiresRegister()); |
locs->set_temp(0, Location::RequiresRegister()); |
- locs->set_out(is_used() ? Location::SameAsFirstInput() |
- : Location::NoLocation()); |
return locs; |
} |
@@ -1042,7 +1044,6 @@ LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { |
void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register value = locs()->in(0).reg(); |
Register temp = locs()->temp(0).reg(); |
- ASSERT(!is_used() || (locs()->out().reg() == value)); |
__ LoadObject(temp, field()); |
if (this->value()->NeedsStoreBuffer()) { |