| 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 6528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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()); |
| 6547 const int32_t shift = | 6547 const int32_t shift = |
| 6548 reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1; | 6548 reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1; |
| 6549 ASSERT(!has_shift_count_check()); |
| 6550 ASSERT(shift >= 0); |
| 6549 switch (op_kind()) { | 6551 switch (op_kind()) { |
| 6550 case Token::kSHR: { | 6552 case Token::kSHR: { |
| 6551 if (shift < 32) { | 6553 if (shift < 32) { |
| 6552 __ Lsl(out_lo, left_hi, Operand(32 - shift)); | 6554 __ Lsl(out_lo, left_hi, Operand(32 - shift)); |
| 6553 __ orr(out_lo, out_lo, Operand(left_lo, LSR, shift)); | 6555 __ orr(out_lo, out_lo, Operand(left_lo, LSR, shift)); |
| 6554 __ Asr(out_hi, left_hi, Operand(shift)); | 6556 __ Asr(out_hi, left_hi, Operand(shift)); |
| 6555 } else { | 6557 } else { |
| 6556 if (shift == 32) { | 6558 if (shift == 32) { |
| 6557 __ mov(out_lo, Operand(left_hi)); | 6559 __ mov(out_lo, Operand(left_hi)); |
| 6558 } else if (shift < 64) { | 6560 } else if (shift < 64) { |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7149 ASSERT(!compiler->is_optimizing()); | 7151 ASSERT(!compiler->is_optimizing()); |
| 7150 __ BranchLinkPatchable(*StubCode::DebugStepCheck_entry()); | 7152 __ BranchLinkPatchable(*StubCode::DebugStepCheck_entry()); |
| 7151 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos()); | 7153 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos()); |
| 7152 compiler->RecordSafepoint(locs()); | 7154 compiler->RecordSafepoint(locs()); |
| 7153 } | 7155 } |
| 7154 | 7156 |
| 7155 | 7157 |
| 7156 } // namespace dart | 7158 } // namespace dart |
| 7157 | 7159 |
| 7158 #endif // defined TARGET_ARCH_ARM | 7160 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |