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 3582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 3601 |
3602 void LCodeGen::DoMathExp(LMathExp* instr) { | 3602 void LCodeGen::DoMathExp(LMathExp* instr) { |
3603 XMMRegister input = ToDoubleRegister(instr->value()); | 3603 DCHECK(ToDoubleRegister(instr->value()).is(xmm0)); |
3604 XMMRegister result = ToDoubleRegister(instr->result()); | 3604 DCHECK(ToDoubleRegister(instr->result()).is(xmm0)); |
3605 XMMRegister temp0 = double_scratch0(); | 3605 __ PrepareCallCFunction(1); |
3606 Register temp1 = ToRegister(instr->temp1()); | 3606 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 1); |
3607 Register temp2 = ToRegister(instr->temp2()); | |
3608 | |
3609 MathExpGenerator::EmitMathExp(masm(), input, result, temp0, temp1, temp2); | |
3610 } | 3607 } |
3611 | 3608 |
3612 | 3609 |
3613 void LCodeGen::DoMathLog(LMathLog* instr) { | 3610 void LCodeGen::DoMathLog(LMathLog* instr) { |
3614 DCHECK(ToDoubleRegister(instr->value()).is(xmm0)); | 3611 DCHECK(ToDoubleRegister(instr->value()).is(xmm0)); |
3615 DCHECK(ToDoubleRegister(instr->result()).is(xmm0)); | 3612 DCHECK(ToDoubleRegister(instr->result()).is(xmm0)); |
3616 __ PrepareCallCFunction(1); | 3613 __ PrepareCallCFunction(1); |
3617 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 1); | 3614 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 1); |
3618 } | 3615 } |
3619 | 3616 |
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5592 __ bind(deferred->exit()); | 5589 __ bind(deferred->exit()); |
5593 __ bind(&done); | 5590 __ bind(&done); |
5594 } | 5591 } |
5595 | 5592 |
5596 #undef __ | 5593 #undef __ |
5597 | 5594 |
5598 } // namespace internal | 5595 } // namespace internal |
5599 } // namespace v8 | 5596 } // namespace v8 |
5600 | 5597 |
5601 #endif // V8_TARGET_ARCH_X64 | 5598 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |