| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
| (...skipping 3756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3767 } else if (exponent_type.IsInteger32()) { | 3767 } else if (exponent_type.IsInteger32()) { |
| 3768 MathPowStub stub(isolate(), MathPowStub::INTEGER); | 3768 MathPowStub stub(isolate(), MathPowStub::INTEGER); |
| 3769 __ CallStub(&stub); | 3769 __ CallStub(&stub); |
| 3770 } else { | 3770 } else { |
| 3771 DCHECK(exponent_type.IsDouble()); | 3771 DCHECK(exponent_type.IsDouble()); |
| 3772 MathPowStub stub(isolate(), MathPowStub::DOUBLE); | 3772 MathPowStub stub(isolate(), MathPowStub::DOUBLE); |
| 3773 __ CallStub(&stub); | 3773 __ CallStub(&stub); |
| 3774 } | 3774 } |
| 3775 } | 3775 } |
| 3776 | 3776 |
| 3777 void LCodeGen::DoMathCos(LMathCos* instr) { |
| 3778 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3779 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3780 __ CallCFunction(ExternalReference::ieee754_cos_function(isolate()), 0, 1); |
| 3781 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3782 } |
| 3783 |
| 3784 void LCodeGen::DoMathSin(LMathSin* instr) { |
| 3785 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3786 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3787 __ CallCFunction(ExternalReference::ieee754_sin_function(isolate()), 0, 1); |
| 3788 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3789 } |
| 3790 |
| 3777 void LCodeGen::DoMathExp(LMathExp* instr) { | 3791 void LCodeGen::DoMathExp(LMathExp* instr) { |
| 3778 __ PrepareCallCFunction(0, 1, scratch0()); | 3792 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3779 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3793 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3780 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); | 3794 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); |
| 3781 __ MovFromFloatResult(ToDoubleRegister(instr->result())); | 3795 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3782 } | 3796 } |
| 3783 | 3797 |
| 3784 void LCodeGen::DoMathLog(LMathLog* instr) { | 3798 void LCodeGen::DoMathLog(LMathLog* instr) { |
| 3785 __ PrepareCallCFunction(0, 1, scratch0()); | 3799 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3786 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3800 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| (...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5802 __ LoadP(result, | 5816 __ LoadP(result, |
| 5803 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5817 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5804 __ bind(deferred->exit()); | 5818 __ bind(deferred->exit()); |
| 5805 __ bind(&done); | 5819 __ bind(&done); |
| 5806 } | 5820 } |
| 5807 | 5821 |
| 5808 #undef __ | 5822 #undef __ |
| 5809 | 5823 |
| 5810 } // namespace internal | 5824 } // namespace internal |
| 5811 } // namespace v8 | 5825 } // namespace v8 |
| OLD | NEW |