| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 4238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4249 ASSERT(locs()->in(0).fpu_reg() == XMM1); | 4249 ASSERT(locs()->in(0).fpu_reg() == XMM1); |
| 4250 __ EnterFrame(0); | 4250 __ EnterFrame(0); |
| 4251 __ ReserveAlignedFrameSpace(0); | 4251 __ ReserveAlignedFrameSpace(0); |
| 4252 __ movaps(XMM0, locs()->in(0).fpu_reg()); | 4252 __ movaps(XMM0, locs()->in(0).fpu_reg()); |
| 4253 if (InputCount() == 2) { | 4253 if (InputCount() == 2) { |
| 4254 ASSERT(locs()->in(1).fpu_reg() == XMM2); | 4254 ASSERT(locs()->in(1).fpu_reg() == XMM2); |
| 4255 __ movaps(XMM1, locs()->in(1).fpu_reg()); | 4255 __ movaps(XMM1, locs()->in(1).fpu_reg()); |
| 4256 } | 4256 } |
| 4257 // For pow-function return NaN if exponent is NaN. | 4257 // For pow-function return NaN if exponent is NaN. |
| 4258 Label do_call, skip_call; | 4258 Label do_call, skip_call; |
| 4259 if (recognized_kind() == MethodRecognizer::kDoublePow) { | 4259 if (recognized_kind() == MethodRecognizer::kMathDoublePow) { |
| 4260 XmmRegister exp = locs()->in(1).fpu_reg(); | 4260 XmmRegister exp = locs()->in(1).fpu_reg(); |
| 4261 __ comisd(exp, exp); | 4261 __ comisd(exp, exp); |
| 4262 __ j(PARITY_ODD, &do_call, Assembler::kNearJump); // NaN -> false; | 4262 __ j(PARITY_ODD, &do_call, Assembler::kNearJump); // NaN -> false; |
| 4263 // Exponent is NaN, return NaN. | 4263 // Exponent is NaN, return NaN. |
| 4264 __ movaps(locs()->out().fpu_reg(), exp); | 4264 __ movaps(locs()->out().fpu_reg(), exp); |
| 4265 __ jmp(&skip_call, Assembler::kNearJump); | 4265 __ jmp(&skip_call, Assembler::kNearJump); |
| 4266 } | 4266 } |
| 4267 __ Bind(&do_call); | 4267 __ Bind(&do_call); |
| 4268 __ CallRuntime(TargetFunction()); | 4268 __ CallRuntime(TargetFunction()); |
| 4269 __ movaps(locs()->out().fpu_reg(), XMM0); | 4269 __ movaps(locs()->out().fpu_reg(), XMM0); |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4795 PcDescriptors::kOther, | 4795 PcDescriptors::kOther, |
| 4796 locs()); | 4796 locs()); |
| 4797 __ Drop(2); // Discard type arguments and receiver. | 4797 __ Drop(2); // Discard type arguments and receiver. |
| 4798 } | 4798 } |
| 4799 | 4799 |
| 4800 } // namespace dart | 4800 } // namespace dart |
| 4801 | 4801 |
| 4802 #undef __ | 4802 #undef __ |
| 4803 | 4803 |
| 4804 #endif // defined TARGET_ARCH_X64 | 4804 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |