| Index: runtime/vm/intermediate_language_x64.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_x64.cc (revision 27045)
|
| +++ runtime/vm/intermediate_language_x64.cc (working copy)
|
| @@ -927,25 +927,18 @@
|
| summary->set_in(1, Location::RequiresFpuRegister());
|
| summary->set_out(Location::RequiresRegister());
|
| return summary;
|
| - } else if (operation_cid() == kSmiCid) {
|
| - LocationSummary* summary =
|
| - new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| - summary->set_in(0, Location::RegisterOrConstant(left()));
|
| - // Only one input can be a constant operand. The case of two constant
|
| - // operands should be handled by constant propagation.
|
| - summary->set_in(1, summary->in(0).IsConstant()
|
| - ? Location::RequiresRegister()
|
| - : Location::RegisterOrConstant(right()));
|
| - summary->set_out(Location::RequiresRegister());
|
| - return summary;
|
| }
|
| - LocationSummary* locs =
|
| - new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
|
| - // Pick arbitrary fixed input registers because this is a call.
|
| - locs->set_in(0, Location::RegisterLocation(RAX));
|
| - locs->set_in(1, Location::RegisterLocation(RCX));
|
| - locs->set_out(Location::RegisterLocation(RAX));
|
| - return locs;
|
| + ASSERT(operation_cid() == kSmiCid);
|
| + LocationSummary* summary =
|
| + new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| + summary->set_in(0, Location::RegisterOrConstant(left()));
|
| + // Only one input can be a constant operand. The case of two constant
|
| + // operands should be handled by constant propagation.
|
| + summary->set_in(1, summary->in(0).IsConstant()
|
| + ? Location::RequiresRegister()
|
| + : Location::RegisterOrConstant(right()));
|
| + summary->set_out(Location::RequiresRegister());
|
| + return summary;
|
| }
|
|
|
|
|
| @@ -954,71 +947,8 @@
|
| EmitSmiComparisonOp(compiler, *locs(), kind(), NULL);
|
| return;
|
| }
|
| - if (operation_cid() == kDoubleCid) {
|
| - EmitDoubleComparisonOp(compiler, *locs(), kind(), NULL);
|
| - return;
|
| - }
|
| -
|
| - // Push arguments for the call.
|
| - // TODO(fschneider): Split this instruction into different types to avoid
|
| - // explicitly pushing arguments to the call here.
|
| - Register left = locs()->in(0).reg();
|
| - Register right = locs()->in(1).reg();
|
| - __ pushq(left);
|
| - __ pushq(right);
|
| - if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
|
| - Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptRelationalOp);
|
| -
|
| - // Load class into RDI. Since this is a call, any register except
|
| - // the fixed input registers would be ok.
|
| - ASSERT((left != RDI) && (right != RDI));
|
| - LoadValueCid(compiler, RDI, left);
|
| - const intptr_t kNumArguments = 2;
|
| - compiler->EmitTestAndCall(ICData::Handle(ic_data()->AsUnaryClassChecks()),
|
| - RDI, // Class id register.
|
| - kNumArguments,
|
| - Object::null_array(), // No named arguments.
|
| - deopt, // Deoptimize target.
|
| - deopt_id(),
|
| - token_pos(),
|
| - locs());
|
| - return;
|
| - }
|
| - const String& function_name =
|
| - String::ZoneHandle(Symbols::New(Token::Str(kind())));
|
| - if (!compiler->is_optimizing()) {
|
| - compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
|
| - deopt_id(),
|
| - token_pos());
|
| - }
|
| - const intptr_t kNumArguments = 2;
|
| - const intptr_t kNumArgsChecked = 2; // Type-feedback.
|
| - ICData& relational_ic_data = ICData::ZoneHandle(ic_data()->raw());
|
| - if (compiler->is_optimizing() && FLAG_propagate_ic_data) {
|
| - ASSERT(!ic_data()->IsNull());
|
| - if (ic_data()->NumberOfChecks() == 0) {
|
| - // IC call for reoptimization populates original ICData.
|
| - relational_ic_data = ic_data()->raw();
|
| - } else {
|
| - // Megamorphic call.
|
| - relational_ic_data = ic_data()->AsUnaryClassChecks();
|
| - }
|
| - } else {
|
| - const Array& arguments_descriptor =
|
| - Array::Handle(ArgumentsDescriptor::New(kNumArguments,
|
| - Object::null_array()));
|
| - relational_ic_data = ICData::New(compiler->parsed_function().function(),
|
| - function_name,
|
| - arguments_descriptor,
|
| - deopt_id(),
|
| - kNumArgsChecked);
|
| - }
|
| - compiler->GenerateInstanceCall(deopt_id(),
|
| - token_pos(),
|
| - kNumArguments,
|
| - Object::null_array(), // No optional args.
|
| - locs(),
|
| - relational_ic_data);
|
| + ASSERT(operation_cid() == kDoubleCid);
|
| + EmitDoubleComparisonOp(compiler, *locs(), kind(), NULL);
|
| }
|
|
|
|
|
| @@ -1028,13 +958,8 @@
|
| EmitSmiComparisonOp(compiler, *locs(), kind(), branch);
|
| return;
|
| }
|
| - if (operation_cid() == kDoubleCid) {
|
| - EmitDoubleComparisonOp(compiler, *locs(), kind(), branch);
|
| - return;
|
| - }
|
| - EmitNativeCode(compiler);
|
| - __ CompareObject(RAX, Bool::True());
|
| - branch->EmitBranchOnCondition(compiler, EQUAL);
|
| + ASSERT(operation_cid() == kDoubleCid);
|
| + EmitDoubleComparisonOp(compiler, *locs(), kind(), branch);
|
| }
|
|
|
|
|
|
|