Index: runtime/vm/intermediate_language_ia32.cc |
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc |
index 8484162172dab831b35f0bb28b50362bdf73266e..dfcc10835cb8b0953b8f44006b35aa4a9cf5c199 100644 |
--- a/runtime/vm/intermediate_language_ia32.cc |
+++ b/runtime/vm/intermediate_language_ia32.cc |
@@ -6580,6 +6580,29 @@ void IndirectGotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
+LocationSummary* SmiRangeComparisonInstr::MakeLocationSummary(Zone* zone, |
+ bool opt) const { |
+ const intptr_t kNumInputs = 1; |
+ const intptr_t kNumTemps = 1; |
+ LocationSummary* locs = new (zone) |
+ LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
+ locs->set_in(0, Location::RequiresRegister()); |
+ locs->set_temp(0, Location::RequiresRegister()); |
+ return locs; |
+} |
+ |
+ |
+Condition SmiRangeComparisonInstr::EmitComparisonCode( |
+ FlowGraphCompiler* compiler, |
+ BranchLabels labels) { |
+ Register in = locs()->in(0).reg(); |
+ Register temp = locs()->temp(0).reg(); |
+ __ leal(temp, Address(in, Smi::RawValue(-from_))); |
+ __ cmpl(temp, Immediate(Smi::RawValue(to_ - from_))); |
+ return is_negated() ? ABOVE : BELOW_EQUAL; |
+} |
+ |
+ |
LocationSummary* StrictCompareInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |