Chromium Code Reviews| 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 6525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6536 PairLocation* out_pair = locs()->out(0).AsPairLocation(); | 6536 PairLocation* out_pair = locs()->out(0).AsPairLocation(); |
| 6537 Register out_lo = out_pair->At(0).reg(); | 6537 Register out_lo = out_pair->At(0).reg(); |
| 6538 Register out_hi = out_pair->At(1).reg(); | 6538 Register out_hi = out_pair->At(1).reg(); |
| 6539 | 6539 |
| 6540 Label* deopt = NULL; | 6540 Label* deopt = NULL; |
| 6541 if (CanDeoptimize()) { | 6541 if (CanDeoptimize()) { |
| 6542 deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp); | 6542 deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp); |
| 6543 } | 6543 } |
| 6544 if (locs()->in(1).IsConstant()) { | 6544 if (locs()->in(1).IsConstant()) { |
| 6545 // Code for a constant shift amount. | 6545 // Code for a constant shift amount. |
| 6546 ASSERT(locs()->in(1).constant().IsSmi()); | 6546 ASSERT(locs()->in(1).constant().IsSmi()); |
|
Vyacheslav Egorov (Google)
2017/07/12 16:56:27
I think this ASSERT can be deleted because Smi::Ca
alexmarkov
2017/07/12 17:37:37
You are right, it can be deleted. However, I think
| |
| 6547 const int32_t shift = | 6547 const int32_t shift = Smi::Cast(locs()->in(1).constant()).Value(); |
| 6548 reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1; | |
| 6549 ASSERT(shift >= 0); | 6548 ASSERT(shift >= 0); |
| 6550 switch (op_kind()) { | 6549 switch (op_kind()) { |
| 6551 case Token::kSHR: { | 6550 case Token::kSHR: { |
| 6552 if (shift < 32) { | 6551 if (shift < 32) { |
| 6553 __ Lsl(out_lo, left_hi, Operand(32 - shift)); | 6552 __ Lsl(out_lo, left_hi, Operand(32 - shift)); |
| 6554 __ orr(out_lo, out_lo, Operand(left_lo, LSR, shift)); | 6553 __ orr(out_lo, out_lo, Operand(left_lo, LSR, shift)); |
| 6555 __ Asr(out_hi, left_hi, Operand(shift)); | 6554 __ Asr(out_hi, left_hi, Operand(shift)); |
| 6556 } else { | 6555 } else { |
| 6557 if (shift == 32) { | 6556 if (shift == 32) { |
| 6558 __ mov(out_lo, Operand(left_hi)); | 6557 __ mov(out_lo, Operand(left_hi)); |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7150 ASSERT(!compiler->is_optimizing()); | 7149 ASSERT(!compiler->is_optimizing()); |
| 7151 __ BranchLinkPatchable(*StubCode::DebugStepCheck_entry()); | 7150 __ BranchLinkPatchable(*StubCode::DebugStepCheck_entry()); |
| 7152 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos()); | 7151 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos()); |
| 7153 compiler->RecordSafepoint(locs()); | 7152 compiler->RecordSafepoint(locs()); |
| 7154 } | 7153 } |
| 7155 | 7154 |
| 7156 | 7155 |
| 7157 } // namespace dart | 7156 } // namespace dart |
| 7158 | 7157 |
| 7159 #endif // defined TARGET_ARCH_ARM | 7158 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |