| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 3580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3591 } else if (exponent_type.IsInteger32()) { | 3591 } else if (exponent_type.IsInteger32()) { |
| 3592 MathPowStub stub(isolate(), MathPowStub::INTEGER); | 3592 MathPowStub stub(isolate(), MathPowStub::INTEGER); |
| 3593 __ CallStub(&stub); | 3593 __ CallStub(&stub); |
| 3594 } else { | 3594 } else { |
| 3595 DCHECK(exponent_type.IsDouble()); | 3595 DCHECK(exponent_type.IsDouble()); |
| 3596 MathPowStub stub(isolate(), MathPowStub::DOUBLE); | 3596 MathPowStub stub(isolate(), MathPowStub::DOUBLE); |
| 3597 __ CallStub(&stub); | 3597 __ CallStub(&stub); |
| 3598 } | 3598 } |
| 3599 } | 3599 } |
| 3600 | 3600 |
| 3601 void LCodeGen::DoMathCos(LMathCos* instr) { |
| 3602 DCHECK(ToDoubleRegister(instr->value()).is(xmm0)); |
| 3603 DCHECK(ToDoubleRegister(instr->result()).is(xmm0)); |
| 3604 __ PrepareCallCFunction(1); |
| 3605 __ CallCFunction(ExternalReference::ieee754_cos_function(isolate()), 1); |
| 3606 } |
| 3601 | 3607 |
| 3602 void LCodeGen::DoMathExp(LMathExp* instr) { | 3608 void LCodeGen::DoMathExp(LMathExp* instr) { |
| 3603 DCHECK(ToDoubleRegister(instr->value()).is(xmm0)); | 3609 DCHECK(ToDoubleRegister(instr->value()).is(xmm0)); |
| 3604 DCHECK(ToDoubleRegister(instr->result()).is(xmm0)); | 3610 DCHECK(ToDoubleRegister(instr->result()).is(xmm0)); |
| 3605 __ PrepareCallCFunction(1); | 3611 __ PrepareCallCFunction(1); |
| 3606 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 1); | 3612 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 1); |
| 3607 } | 3613 } |
| 3608 | 3614 |
| 3615 void LCodeGen::DoMathSin(LMathSin* instr) { |
| 3616 DCHECK(ToDoubleRegister(instr->value()).is(xmm0)); |
| 3617 DCHECK(ToDoubleRegister(instr->result()).is(xmm0)); |
| 3618 __ PrepareCallCFunction(1); |
| 3619 __ CallCFunction(ExternalReference::ieee754_sin_function(isolate()), 1); |
| 3620 } |
| 3609 | 3621 |
| 3610 void LCodeGen::DoMathLog(LMathLog* instr) { | 3622 void LCodeGen::DoMathLog(LMathLog* instr) { |
| 3611 DCHECK(ToDoubleRegister(instr->value()).is(xmm0)); | 3623 DCHECK(ToDoubleRegister(instr->value()).is(xmm0)); |
| 3612 DCHECK(ToDoubleRegister(instr->result()).is(xmm0)); | 3624 DCHECK(ToDoubleRegister(instr->result()).is(xmm0)); |
| 3613 __ PrepareCallCFunction(1); | 3625 __ PrepareCallCFunction(1); |
| 3614 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 1); | 3626 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 1); |
| 3615 } | 3627 } |
| 3616 | 3628 |
| 3617 | 3629 |
| 3618 void LCodeGen::DoMathClz32(LMathClz32* instr) { | 3630 void LCodeGen::DoMathClz32(LMathClz32* instr) { |
| (...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5589 __ bind(deferred->exit()); | 5601 __ bind(deferred->exit()); |
| 5590 __ bind(&done); | 5602 __ bind(&done); |
| 5591 } | 5603 } |
| 5592 | 5604 |
| 5593 #undef __ | 5605 #undef __ |
| 5594 | 5606 |
| 5595 } // namespace internal | 5607 } // namespace internal |
| 5596 } // namespace v8 | 5608 } // namespace v8 |
| 5597 | 5609 |
| 5598 #endif // V8_TARGET_ARCH_X64 | 5610 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |