| 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/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 4122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4133 result->set_in(1, Location::FpuRegisterLocation(Q1)); | 4133 result->set_in(1, Location::FpuRegisterLocation(Q1)); |
| 4134 } | 4134 } |
| 4135 result->set_out(Location::FpuRegisterLocation(Q0)); | 4135 result->set_out(Location::FpuRegisterLocation(Q0)); |
| 4136 return result; | 4136 return result; |
| 4137 } | 4137 } |
| 4138 | 4138 |
| 4139 | 4139 |
| 4140 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4140 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4141 // For pow-function return NaN if exponent is NaN. | 4141 // For pow-function return NaN if exponent is NaN. |
| 4142 Label do_call, skip_call; | 4142 Label do_call, skip_call; |
| 4143 if (recognized_kind() == MethodRecognizer::kDoublePow) { | 4143 if (recognized_kind() == MethodRecognizer::kMathDoublePow) { |
| 4144 DRegister exp = EvenDRegisterOf(locs()->in(1).fpu_reg()); | 4144 DRegister exp = EvenDRegisterOf(locs()->in(1).fpu_reg()); |
| 4145 DRegister result = EvenDRegisterOf(locs()->out().fpu_reg()); | 4145 DRegister result = EvenDRegisterOf(locs()->out().fpu_reg()); |
| 4146 __ vcmpd(exp, exp); | 4146 __ vcmpd(exp, exp); |
| 4147 __ vmstat(); | 4147 __ vmstat(); |
| 4148 __ b(&do_call, VC); // NaN -> false; | 4148 __ b(&do_call, VC); // NaN -> false; |
| 4149 // Exponent is NaN, return NaN. | 4149 // Exponent is NaN, return NaN. |
| 4150 __ vmovd(result, exp); | 4150 __ vmovd(result, exp); |
| 4151 __ b(&skip_call); | 4151 __ b(&skip_call); |
| 4152 } | 4152 } |
| 4153 __ Bind(&do_call); | 4153 __ Bind(&do_call); |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4643 compiler->GenerateCall(token_pos(), | 4643 compiler->GenerateCall(token_pos(), |
| 4644 &label, | 4644 &label, |
| 4645 PcDescriptors::kOther, | 4645 PcDescriptors::kOther, |
| 4646 locs()); | 4646 locs()); |
| 4647 __ Drop(2); // Discard type arguments and receiver. | 4647 __ Drop(2); // Discard type arguments and receiver. |
| 4648 } | 4648 } |
| 4649 | 4649 |
| 4650 } // namespace dart | 4650 } // namespace dart |
| 4651 | 4651 |
| 4652 #endif // defined TARGET_ARCH_ARM | 4652 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |