| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 6991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7002 Operand offset_opr = (offset()->definition()->representation() == kTagged) | 7002 Operand offset_opr = (offset()->definition()->representation() == kTagged) |
| 7003 ? Operand(offset_reg, ASR, kSmiTagSize) | 7003 ? Operand(offset_reg, ASR, kSmiTagSize) |
| 7004 : Operand(offset_reg); | 7004 : Operand(offset_reg); |
| 7005 __ add(target_address_reg, target_address_reg, offset_opr); | 7005 __ add(target_address_reg, target_address_reg, offset_opr); |
| 7006 | 7006 |
| 7007 // Jump to the absolute address. | 7007 // Jump to the absolute address. |
| 7008 __ bx(target_address_reg); | 7008 __ bx(target_address_reg); |
| 7009 } | 7009 } |
| 7010 | 7010 |
| 7011 | 7011 |
| 7012 LocationSummary* SmiRangeComparisonInstr::MakeLocationSummary(Zone* zone, |
| 7013 bool opt) const { |
| 7014 const intptr_t kNumInputs = 1; |
| 7015 const intptr_t kNumTemps = 0; |
| 7016 LocationSummary* locs = new (zone) |
| 7017 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 7018 locs->set_in(0, Location::RequiresRegister()); |
| 7019 return locs; |
| 7020 } |
| 7021 |
| 7022 |
| 7023 Condition SmiRangeComparisonInstr::EmitComparisonCode( |
| 7024 FlowGraphCompiler* compiler, |
| 7025 BranchLabels labels) { |
| 7026 Register in = locs()->in(0).reg(); |
| 7027 __ sub(TMP, in, Operand(Smi::RawValue(from_))); |
| 7028 __ cmp(TMP, Operand(Smi::RawValue(to_ - from_))); |
| 7029 return is_negated_ ? HI : LS; |
| 7030 } |
| 7031 |
| 7032 |
| 7012 LocationSummary* StrictCompareInstr::MakeLocationSummary(Zone* zone, | 7033 LocationSummary* StrictCompareInstr::MakeLocationSummary(Zone* zone, |
| 7013 bool opt) const { | 7034 bool opt) const { |
| 7014 const intptr_t kNumInputs = 2; | 7035 const intptr_t kNumInputs = 2; |
| 7015 const intptr_t kNumTemps = 0; | 7036 const intptr_t kNumTemps = 0; |
| 7016 if (needs_number_check()) { | 7037 if (needs_number_check()) { |
| 7017 LocationSummary* locs = new (zone) | 7038 LocationSummary* locs = new (zone) |
| 7018 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 7039 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
| 7019 locs->set_in(0, Location::RegisterLocation(R0)); | 7040 locs->set_in(0, Location::RegisterLocation(R0)); |
| 7020 locs->set_in(1, Location::RegisterLocation(R1)); | 7041 locs->set_in(1, Location::RegisterLocation(R1)); |
| 7021 locs->set_out(0, Location::RegisterLocation(R0)); | 7042 locs->set_out(0, Location::RegisterLocation(R0)); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7149 ASSERT(!compiler->is_optimizing()); | 7170 ASSERT(!compiler->is_optimizing()); |
| 7150 __ BranchLinkPatchable(*StubCode::DebugStepCheck_entry()); | 7171 __ BranchLinkPatchable(*StubCode::DebugStepCheck_entry()); |
| 7151 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos()); | 7172 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos()); |
| 7152 compiler->RecordSafepoint(locs()); | 7173 compiler->RecordSafepoint(locs()); |
| 7153 } | 7174 } |
| 7154 | 7175 |
| 7155 | 7176 |
| 7156 } // namespace dart | 7177 } // namespace dart |
| 7157 | 7178 |
| 7158 #endif // defined TARGET_ARCH_ARM | 7179 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |