| 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 3054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3065 // TODO(vegorov): should be handled outside. | 3065 // TODO(vegorov): should be handled outside. |
| 3066 __ MoveRegister(result, left); | 3066 __ MoveRegister(result, left); |
| 3067 break; | 3067 break; |
| 3068 } else if (value < 0) { | 3068 } else if (value < 0) { |
| 3069 // TODO(vegorov): should be handled outside. | 3069 // TODO(vegorov): should be handled outside. |
| 3070 __ b(deopt); | 3070 __ b(deopt); |
| 3071 break; | 3071 break; |
| 3072 } | 3072 } |
| 3073 | 3073 |
| 3074 value = value + kSmiTagSize; | 3074 value = value + kSmiTagSize; |
| 3075 if (value >= kCountLimit) value = kCountLimit; | 3075 if (value >= kCountLimit) { |
| 3076 value = kCountLimit; |
| 3077 } |
| 3076 | 3078 |
| 3077 __ Asr(result, left, value); | 3079 __ Asr(result, left, value); |
| 3078 __ SmiTag(result); | 3080 __ SmiTag(result); |
| 3079 break; | 3081 break; |
| 3080 } | 3082 } |
| 3081 | 3083 |
| 3082 default: | 3084 default: |
| 3083 UNREACHABLE(); | 3085 UNREACHABLE(); |
| 3084 break; | 3086 break; |
| 3085 } | 3087 } |
| (...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5207 // base == -Infinity -> call pow; | 5209 // base == -Infinity -> call pow; |
| 5208 __ vcmpd(saved_base, result); | 5210 __ vcmpd(saved_base, result); |
| 5209 __ b(&do_pow, EQ); | 5211 __ b(&do_pow, EQ); |
| 5210 | 5212 |
| 5211 // exponent == 0.5 ? | 5213 // exponent == 0.5 ? |
| 5212 __ LoadDImmediate(result, 0.5, temp); | 5214 __ LoadDImmediate(result, 0.5, temp); |
| 5213 __ vcmpd(exp, result); | 5215 __ vcmpd(exp, result); |
| 5214 __ b(&do_pow, NE); | 5216 __ b(&do_pow, NE); |
| 5215 | 5217 |
| 5216 // base == 0 -> return 0; | 5218 // base == 0 -> return 0; |
| 5217 __ vcmpdz(base); | 5219 __ vcmpdz(saved_base); |
| 5218 __ b(&return_zero, EQ); | 5220 __ b(&return_zero, EQ); |
| 5219 | 5221 |
| 5220 __ vsqrtd(result, saved_base); | 5222 __ vsqrtd(result, saved_base); |
| 5221 __ b(&skip_call); | 5223 __ b(&skip_call); |
| 5222 | 5224 |
| 5223 __ Bind(&return_zero); | 5225 __ Bind(&return_zero); |
| 5224 __ LoadDImmediate(result, 0.0, temp); | 5226 __ LoadDImmediate(result, 0.0, temp); |
| 5225 __ b(&skip_call); | 5227 __ b(&skip_call); |
| 5226 | 5228 |
| 5227 __ Bind(&do_pow); | 5229 __ Bind(&do_pow); |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6143 compiler->GenerateCall(token_pos(), | 6145 compiler->GenerateCall(token_pos(), |
| 6144 &label, | 6146 &label, |
| 6145 PcDescriptors::kOther, | 6147 PcDescriptors::kOther, |
| 6146 locs()); | 6148 locs()); |
| 6147 __ Drop(ArgumentCount()); // Discard arguments. | 6149 __ Drop(ArgumentCount()); // Discard arguments. |
| 6148 } | 6150 } |
| 6149 | 6151 |
| 6150 } // namespace dart | 6152 } // namespace dart |
| 6151 | 6153 |
| 6152 #endif // defined TARGET_ARCH_ARM | 6154 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |