| 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 2917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2928 __ Lsl(result, left, IP); | 2928 __ Lsl(result, left, IP); |
| 2929 } | 2929 } |
| 2930 return; | 2930 return; |
| 2931 } | 2931 } |
| 2932 | 2932 |
| 2933 const bool right_needs_check = | 2933 const bool right_needs_check = |
| 2934 (right_range == NULL) || !right_range->IsWithin(0, (Smi::kBits - 1)); | 2934 (right_range == NULL) || !right_range->IsWithin(0, (Smi::kBits - 1)); |
| 2935 if (is_truncating) { | 2935 if (is_truncating) { |
| 2936 if (right_needs_check) { | 2936 if (right_needs_check) { |
| 2937 const bool right_may_be_negative = | 2937 const bool right_may_be_negative = |
| 2938 (right_range == NULL) || right_range->IsNegative(); | 2938 (right_range == NULL) || !right_range->IsPositive(); |
| 2939 if (right_may_be_negative) { | 2939 if (right_may_be_negative) { |
| 2940 ASSERT(shift_left->CanDeoptimize()); | 2940 ASSERT(shift_left->CanDeoptimize()); |
| 2941 __ cmp(right, Operand(0)); | 2941 __ cmp(right, Operand(0)); |
| 2942 __ b(deopt, MI); | 2942 __ b(deopt, MI); |
| 2943 } | 2943 } |
| 2944 | 2944 |
| 2945 __ cmp(right, Operand(reinterpret_cast<int32_t>(Smi::New(Smi::kBits)))); | 2945 __ cmp(right, Operand(reinterpret_cast<int32_t>(Smi::New(Smi::kBits)))); |
| 2946 __ mov(result, Operand(0), CS); | 2946 __ mov(result, Operand(0), CS); |
| 2947 __ SmiUntag(IP, right, CC); // SmiUntag right into IP if CC. | 2947 __ SmiUntag(IP, right, CC); // SmiUntag right into IP if CC. |
| 2948 __ Lsl(result, left, IP, CC); | 2948 __ Lsl(result, left, IP, CC); |
| (...skipping 3404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6353 compiler->GenerateCall(token_pos(), | 6353 compiler->GenerateCall(token_pos(), |
| 6354 &label, | 6354 &label, |
| 6355 PcDescriptors::kOther, | 6355 PcDescriptors::kOther, |
| 6356 locs()); | 6356 locs()); |
| 6357 __ Drop(ArgumentCount()); // Discard arguments. | 6357 __ Drop(ArgumentCount()); // Discard arguments. |
| 6358 } | 6358 } |
| 6359 | 6359 |
| 6360 } // namespace dart | 6360 } // namespace dart |
| 6361 | 6361 |
| 6362 #endif // defined TARGET_ARCH_ARM | 6362 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |