| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 3117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3128 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3128 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3129 summary->set_in(0, Location::RequiresRegister()); | 3129 summary->set_in(0, Location::RequiresRegister()); |
| 3130 summary->set_in(1, Location::RequiresRegister()); | 3130 summary->set_in(1, Location::RequiresRegister()); |
| 3131 if (need_temp) summary->set_temp(0, Location::RequiresRegister()); | 3131 if (need_temp) summary->set_temp(0, Location::RequiresRegister()); |
| 3132 return summary; | 3132 return summary; |
| 3133 } | 3133 } |
| 3134 | 3134 |
| 3135 | 3135 |
| 3136 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3136 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3137 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 3137 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
| 3138 ICData::kDeoptBinaryDoubleOp); | 3138 ICData::kDeoptBinaryDoubleOp, |
| 3139 licm_hoisted_ ? ICData::kHoisted : 0); |
| 3139 intptr_t left_cid = left()->Type()->ToCid(); | 3140 intptr_t left_cid = left()->Type()->ToCid(); |
| 3140 intptr_t right_cid = right()->Type()->ToCid(); | 3141 intptr_t right_cid = right()->Type()->ToCid(); |
| 3141 Register left = locs()->in(0).reg(); | 3142 Register left = locs()->in(0).reg(); |
| 3142 Register right = locs()->in(1).reg(); | 3143 Register right = locs()->in(1).reg(); |
| 3143 if (this->left()->definition() == this->right()->definition()) { | 3144 if (this->left()->definition() == this->right()->definition()) { |
| 3144 __ testq(left, Immediate(kSmiTagMask)); | 3145 __ testq(left, Immediate(kSmiTagMask)); |
| 3145 } else if (left_cid == kSmiCid) { | 3146 } else if (left_cid == kSmiCid) { |
| 3146 __ testq(right, Immediate(kSmiTagMask)); | 3147 __ testq(right, Immediate(kSmiTagMask)); |
| 3147 } else if (right_cid == kSmiCid) { | 3148 } else if (right_cid == kSmiCid) { |
| 3148 __ testq(left, Immediate(kSmiTagMask)); | 3149 __ testq(left, Immediate(kSmiTagMask)); |
| (...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5398 const intptr_t kNumTemps = 0; | 5399 const intptr_t kNumTemps = 0; |
| 5399 LocationSummary* summary = new(isolate) LocationSummary( | 5400 LocationSummary* summary = new(isolate) LocationSummary( |
| 5400 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5401 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 5401 summary->set_in(0, Location::RequiresRegister()); | 5402 summary->set_in(0, Location::RequiresRegister()); |
| 5402 return summary; | 5403 return summary; |
| 5403 } | 5404 } |
| 5404 | 5405 |
| 5405 | 5406 |
| 5406 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5407 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5407 Register value = locs()->in(0).reg(); | 5408 Register value = locs()->in(0).reg(); |
| 5408 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi); | 5409 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
| 5410 ICData::kDeoptCheckSmi, |
| 5411 licm_hoisted_ ? ICData::kHoisted : 0); |
| 5409 __ testq(value, Immediate(kSmiTagMask)); | 5412 __ testq(value, Immediate(kSmiTagMask)); |
| 5410 __ j(NOT_ZERO, deopt); | 5413 __ j(NOT_ZERO, deopt); |
| 5411 } | 5414 } |
| 5412 | 5415 |
| 5413 | 5416 |
| 5414 LocationSummary* CheckClassIdInstr::MakeLocationSummary(Isolate* isolate, | 5417 LocationSummary* CheckClassIdInstr::MakeLocationSummary(Isolate* isolate, |
| 5415 bool opt) const { | 5418 bool opt) const { |
| 5416 const intptr_t kNumInputs = 1; | 5419 const intptr_t kNumInputs = 1; |
| 5417 const intptr_t kNumTemps = 0; | 5420 const intptr_t kNumTemps = 0; |
| 5418 LocationSummary* summary = new(isolate) LocationSummary( | 5421 LocationSummary* summary = new(isolate) LocationSummary( |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5962 __ movq(R10, Immediate(kInvalidObjectPointer)); | 5965 __ movq(R10, Immediate(kInvalidObjectPointer)); |
| 5963 __ movq(RBX, Immediate(kInvalidObjectPointer)); | 5966 __ movq(RBX, Immediate(kInvalidObjectPointer)); |
| 5964 #endif | 5967 #endif |
| 5965 } | 5968 } |
| 5966 | 5969 |
| 5967 } // namespace dart | 5970 } // namespace dart |
| 5968 | 5971 |
| 5969 #undef __ | 5972 #undef __ |
| 5970 | 5973 |
| 5971 #endif // defined TARGET_ARCH_X64 | 5974 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |