Index: runtime/vm/intermediate_language_x64.cc |
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc |
index 6cff06c7fa2b8ab5927f66dc255cc2e656731b75..e9721fdfe0806be91319e018cda7dc5a4ad84b24 100644 |
--- a/runtime/vm/intermediate_language_x64.cc |
+++ b/runtime/vm/intermediate_language_x64.cc |
@@ -6506,6 +6506,30 @@ void IndirectGotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ jmp(target_address_reg); |
} |
+ |
+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(); |
+ __ leaq(temp, Address(in, Smi::RawValue(-from_))); |
+ __ cmpq(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; |