OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
(...skipping 3675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3686 } else if (exponent_type.IsInteger32()) { | 3686 } else if (exponent_type.IsInteger32()) { |
3687 MathPowStub stub(isolate(), MathPowStub::INTEGER); | 3687 MathPowStub stub(isolate(), MathPowStub::INTEGER); |
3688 __ CallStub(&stub); | 3688 __ CallStub(&stub); |
3689 } else { | 3689 } else { |
3690 DCHECK(exponent_type.IsDouble()); | 3690 DCHECK(exponent_type.IsDouble()); |
3691 MathPowStub stub(isolate(), MathPowStub::DOUBLE); | 3691 MathPowStub stub(isolate(), MathPowStub::DOUBLE); |
3692 __ CallStub(&stub); | 3692 __ CallStub(&stub); |
3693 } | 3693 } |
3694 } | 3694 } |
3695 | 3695 |
| 3696 void LCodeGen::DoMathCos(LMathCos* instr) { |
| 3697 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3698 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3699 __ CallCFunction(ExternalReference::ieee754_cos_function(isolate()), 0, 1); |
| 3700 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3701 } |
| 3702 |
| 3703 void LCodeGen::DoMathSin(LMathSin* instr) { |
| 3704 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3705 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3706 __ CallCFunction(ExternalReference::ieee754_sin_function(isolate()), 0, 1); |
| 3707 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3708 } |
3696 | 3709 |
3697 void LCodeGen::DoMathExp(LMathExp* instr) { | 3710 void LCodeGen::DoMathExp(LMathExp* instr) { |
3698 __ PrepareCallCFunction(0, 1, scratch0()); | 3711 __ PrepareCallCFunction(0, 1, scratch0()); |
3699 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3712 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
3700 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); | 3713 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); |
3701 __ MovFromFloatResult(ToDoubleRegister(instr->result())); | 3714 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
3702 } | 3715 } |
3703 | 3716 |
3704 | 3717 |
3705 void LCodeGen::DoMathLog(LMathLog* instr) { | 3718 void LCodeGen::DoMathLog(LMathLog* instr) { |
(...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5745 __ ld(result, FieldMemOperand(scratch, | 5758 __ ld(result, FieldMemOperand(scratch, |
5746 FixedArray::kHeaderSize - kPointerSize)); | 5759 FixedArray::kHeaderSize - kPointerSize)); |
5747 __ bind(deferred->exit()); | 5760 __ bind(deferred->exit()); |
5748 __ bind(&done); | 5761 __ bind(&done); |
5749 } | 5762 } |
5750 | 5763 |
5751 #undef __ | 5764 #undef __ |
5752 | 5765 |
5753 } // namespace internal | 5766 } // namespace internal |
5754 } // namespace v8 | 5767 } // namespace v8 |
OLD | NEW |