| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 4183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4194 | 4194 |
| 4195 | 4195 |
| 4196 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4196 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4197 __ EnterFrame(0); | 4197 __ EnterFrame(0); |
| 4198 __ ReserveAlignedFrameSpace(kDoubleSize * InputCount()); | 4198 __ ReserveAlignedFrameSpace(kDoubleSize * InputCount()); |
| 4199 for (intptr_t i = 0; i < InputCount(); i++) { | 4199 for (intptr_t i = 0; i < InputCount(); i++) { |
| 4200 __ movsd(Address(ESP, kDoubleSize * i), locs()->in(i).fpu_reg()); | 4200 __ movsd(Address(ESP, kDoubleSize * i), locs()->in(i).fpu_reg()); |
| 4201 } | 4201 } |
| 4202 // For pow-function return NaN if exponent is NaN. | 4202 // For pow-function return NaN if exponent is NaN. |
| 4203 Label do_call, skip_call; | 4203 Label do_call, skip_call; |
| 4204 if (recognized_kind() == MethodRecognizer::kDoublePow) { | 4204 if (recognized_kind() == MethodRecognizer::kMathDoublePow) { |
| 4205 XmmRegister exp = locs()->in(1).fpu_reg(); | 4205 XmmRegister exp = locs()->in(1).fpu_reg(); |
| 4206 __ comisd(exp, exp); | 4206 __ comisd(exp, exp); |
| 4207 __ j(PARITY_ODD, &do_call, Assembler::kNearJump); // NaN -> false; | 4207 __ j(PARITY_ODD, &do_call, Assembler::kNearJump); // NaN -> false; |
| 4208 // Exponent is NaN, return NaN. | 4208 // Exponent is NaN, return NaN. |
| 4209 __ movsd(locs()->out().fpu_reg(), exp); | 4209 __ movsd(locs()->out().fpu_reg(), exp); |
| 4210 __ jmp(&skip_call, Assembler::kNearJump); | 4210 __ jmp(&skip_call, Assembler::kNearJump); |
| 4211 } | 4211 } |
| 4212 __ Bind(&do_call); | 4212 __ Bind(&do_call); |
| 4213 __ CallRuntime(TargetFunction()); | 4213 __ CallRuntime(TargetFunction()); |
| 4214 __ fstpl(Address(ESP, 0)); | 4214 __ fstpl(Address(ESP, 0)); |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5179 PcDescriptors::kOther, | 5179 PcDescriptors::kOther, |
| 5180 locs()); | 5180 locs()); |
| 5181 __ Drop(2); // Discard type arguments and receiver. | 5181 __ Drop(2); // Discard type arguments and receiver. |
| 5182 } | 5182 } |
| 5183 | 5183 |
| 5184 } // namespace dart | 5184 } // namespace dart |
| 5185 | 5185 |
| 5186 #undef __ | 5186 #undef __ |
| 5187 | 5187 |
| 5188 #endif // defined TARGET_ARCH_IA32 | 5188 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |