| Index: runtime/vm/intermediate_language_x64.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_x64.cc (revision 12765)
|
| +++ runtime/vm/intermediate_language_x64.cc (working copy)
|
| @@ -1716,108 +1716,6 @@
|
| }
|
|
|
|
|
| -LocationSummary* BinaryMintOpInstr::MakeLocationSummary() const {
|
| - ASSERT(op_kind() == Token::kBIT_AND);
|
| - const intptr_t kNumInputs = 2;
|
| - const intptr_t kNumTemps = 0;
|
| - LocationSummary* summary =
|
| - new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
|
| - summary->set_in(0, Location::RegisterLocation(RAX));
|
| - summary->set_in(1, Location::RegisterLocation(RCX));
|
| - summary->set_out(Location::RegisterLocation(RAX));
|
| - return summary;
|
| -}
|
| -
|
| -
|
| -void BinaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| - // TODO(regis): For now, we only support Token::kBIT_AND for a Mint or Smi
|
| - // receiver and a Mint or Smi argument. We fall back to the run time call if
|
| - // both receiver and argument are Mint or if one of them is Mint and the other
|
| - // is a negative Smi.
|
| - Register left = locs()->in(0).reg();
|
| - Register right = locs()->in(1).reg();
|
| - Register result = locs()->out().reg();
|
| - ASSERT(left == result);
|
| - ASSERT(op_kind() == Token::kBIT_AND);
|
| - Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| - kDeoptBinaryMintOp);
|
| - Label mint_static_call, smi_static_call, non_smi, smi_smi, done;
|
| - __ testq(left, Immediate(kSmiTagMask)); // Is receiver Smi?
|
| - __ j(NOT_ZERO, &non_smi);
|
| - __ testq(right, Immediate(kSmiTagMask)); // Is argument Smi?
|
| - __ j(ZERO, &smi_smi);
|
| - __ CompareClassId(right, kMintCid); // Is argument Mint?
|
| - __ j(NOT_EQUAL, deopt); // Argument neither Smi nor Mint.
|
| - __ cmpq(left, Immediate(0));
|
| - __ j(LESS, &smi_static_call); // Negative Smi receiver, Mint argument.
|
| -
|
| - // Positive Smi receiver, Mint argument.
|
| - // Load lower argument Mint word, convert to Smi. It is OK to loose bits.
|
| - __ movq(right, FieldAddress(right, Mint::value_offset()));
|
| - __ SmiTag(right);
|
| - __ andq(result, right);
|
| - __ jmp(&done);
|
| -
|
| - __ Bind(&non_smi); // Receiver is non-Smi.
|
| - __ CompareClassId(left, kMintCid); // Is receiver Mint?
|
| - __ j(NOT_EQUAL, deopt); // Receiver neither Smi nor Mint.
|
| - __ testq(right, Immediate(kSmiTagMask)); // Is argument Smi?
|
| - __ j(NOT_ZERO, &mint_static_call); // Mint receiver, non-Smi argument.
|
| - __ cmpq(right, Immediate(0));
|
| - __ j(LESS, &mint_static_call); // Mint receiver, negative Smi argument.
|
| -
|
| - // Mint receiver, positive Smi argument.
|
| - // Load lower receiver Mint word, convert to Smi. It is OK to loose bits.
|
| - __ movq(result, FieldAddress(left, Mint::value_offset()));
|
| - __ SmiTag(result);
|
| - __ Bind(&smi_smi);
|
| - __ andq(result, right);
|
| - __ jmp(&done);
|
| -
|
| - __ Bind(&smi_static_call);
|
| - {
|
| - Function& target = Function::ZoneHandle(
|
| - ic_data()->GetTargetForReceiverClassId(kSmiCid));
|
| - if (target.IsNull()) {
|
| - __ jmp(deopt);
|
| - } else {
|
| - __ pushq(left);
|
| - __ pushq(right);
|
| - compiler->GenerateStaticCall(
|
| - instance_call()->deopt_id(),
|
| - instance_call()->token_pos(),
|
| - target,
|
| - instance_call()->ArgumentCount(),
|
| - instance_call()->argument_names(),
|
| - locs());
|
| - ASSERT(result == RAX);
|
| - __ jmp(&done);
|
| - }
|
| - }
|
| -
|
| - __ Bind(&mint_static_call);
|
| - {
|
| - Function& target = Function::ZoneHandle(
|
| - ic_data()->GetTargetForReceiverClassId(kMintCid));
|
| - if (target.IsNull()) {
|
| - __ jmp(deopt);
|
| - } else {
|
| - __ pushq(left);
|
| - __ pushq(right);
|
| - compiler->GenerateStaticCall(
|
| - instance_call()->deopt_id(),
|
| - instance_call()->token_pos(),
|
| - target,
|
| - instance_call()->ArgumentCount(),
|
| - instance_call()->argument_names(),
|
| - locs());
|
| - ASSERT(result == RAX);
|
| - }
|
| - }
|
| - __ Bind(&done);
|
| -}
|
| -
|
| -
|
| LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary() const {
|
| ASSERT((left()->ResultCid() != kDoubleCid) &&
|
| (right()->ResultCid() != kDoubleCid));
|
| @@ -2246,6 +2144,39 @@
|
| }
|
|
|
|
|
| +LocationSummary* UnboxIntegerInstr::MakeLocationSummary() const {
|
| + UNIMPLEMENTED();
|
| + return NULL;
|
| +}
|
| +
|
| +
|
| +void UnboxIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + UNIMPLEMENTED();
|
| +}
|
| +
|
| +
|
| +LocationSummary* BoxIntegerInstr::MakeLocationSummary() const {
|
| + UNIMPLEMENTED();
|
| + return NULL;
|
| +}
|
| +
|
| +
|
| +void BoxIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + UNIMPLEMENTED();
|
| +}
|
| +
|
| +
|
| +LocationSummary* UnboxedMintBinaryOpInstr::MakeLocationSummary() const {
|
| + UNIMPLEMENTED();
|
| + return NULL;
|
| +}
|
| +
|
| +
|
| +void UnboxedMintBinaryOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + UNIMPLEMENTED();
|
| +}
|
| +
|
| +
|
| } // namespace dart
|
|
|
| #undef __
|
|
|