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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 6525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6536 break; | 6536 break; |
6537 default: | 6537 default: |
6538 UNREACHABLE(); | 6538 UNREACHABLE(); |
6539 } | 6539 } |
6540 return; | 6540 return; |
6541 } | 6541 } |
6542 | 6542 |
6543 // Non constant shift value. | 6543 // Non constant shift value. |
6544 Register shifter = locs()->in(1).reg(); | 6544 Register shifter = locs()->in(1).reg(); |
6545 | 6545 |
6546 __ mov(temp, Operand(shifter)); | 6546 __ SmiUntag(temp, shifter); |
6547 __ SmiUntag(temp); | |
6548 __ CompareImmediate(temp, 0); | 6547 __ CompareImmediate(temp, 0); |
6549 // If shift value is < 0, deoptimize. | 6548 // If shift value is < 0, deoptimize. |
6550 __ b(deopt, LT); | 6549 __ b(deopt, LT); |
6551 __ CompareImmediate(temp, kShifterLimit); | 6550 __ CompareImmediate(temp, kShifterLimit); |
6552 // > kShifterLimit, result is 0. | 6551 // > kShifterLimit, result is 0. |
6553 __ eor(out, out, Operand(out), HI); | 6552 __ eor(out, out, Operand(out), HI); |
6554 // Do the shift. | 6553 // Do the shift. |
6555 switch (op_kind()) { | 6554 switch (op_kind()) { |
6556 case Token::kSHR: | 6555 case Token::kSHR: |
6557 __ Lsr(out, left, temp, LS); | 6556 __ Lsr(out, left, temp, LS); |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6903 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 6902 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
6904 #if defined(DEBUG) | 6903 #if defined(DEBUG) |
6905 __ LoadImmediate(R4, kInvalidObjectPointer); | 6904 __ LoadImmediate(R4, kInvalidObjectPointer); |
6906 __ LoadImmediate(R5, kInvalidObjectPointer); | 6905 __ LoadImmediate(R5, kInvalidObjectPointer); |
6907 #endif | 6906 #endif |
6908 } | 6907 } |
6909 | 6908 |
6910 } // namespace dart | 6909 } // namespace dart |
6911 | 6910 |
6912 #endif // defined TARGET_ARCH_ARM | 6911 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |