| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" | 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" |
| 7 | 7 |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3662 } else if (exponent_type.IsInteger32()) { | 3662 } else if (exponent_type.IsInteger32()) { |
| 3663 MathPowStub stub(isolate(), MathPowStub::INTEGER); | 3663 MathPowStub stub(isolate(), MathPowStub::INTEGER); |
| 3664 __ CallStub(&stub); | 3664 __ CallStub(&stub); |
| 3665 } else { | 3665 } else { |
| 3666 DCHECK(exponent_type.IsDouble()); | 3666 DCHECK(exponent_type.IsDouble()); |
| 3667 MathPowStub stub(isolate(), MathPowStub::DOUBLE); | 3667 MathPowStub stub(isolate(), MathPowStub::DOUBLE); |
| 3668 __ CallStub(&stub); | 3668 __ CallStub(&stub); |
| 3669 } | 3669 } |
| 3670 } | 3670 } |
| 3671 | 3671 |
| 3672 void LCodeGen::DoMathCos(LMathCos* instr) { |
| 3673 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3674 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3675 __ CallCFunction(ExternalReference::ieee754_cos_function(isolate()), 0, 1); |
| 3676 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3677 } |
| 3678 |
| 3679 void LCodeGen::DoMathSin(LMathSin* instr) { |
| 3680 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3681 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3682 __ CallCFunction(ExternalReference::ieee754_sin_function(isolate()), 0, 1); |
| 3683 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3684 } |
| 3685 |
| 3672 void LCodeGen::DoMathExp(LMathExp* instr) { | 3686 void LCodeGen::DoMathExp(LMathExp* instr) { |
| 3673 __ PrepareCallCFunction(0, 1, scratch0()); | 3687 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3674 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3688 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3675 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); | 3689 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); |
| 3676 __ MovFromFloatResult(ToDoubleRegister(instr->result())); | 3690 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3677 } | 3691 } |
| 3678 | 3692 |
| 3679 void LCodeGen::DoMathLog(LMathLog* instr) { | 3693 void LCodeGen::DoMathLog(LMathLog* instr) { |
| 3680 __ PrepareCallCFunction(0, 1, scratch0()); | 3694 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3681 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3695 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| (...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5688 __ LoadP(result, | 5702 __ LoadP(result, |
| 5689 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5703 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5690 __ bind(deferred->exit()); | 5704 __ bind(deferred->exit()); |
| 5691 __ bind(&done); | 5705 __ bind(&done); |
| 5692 } | 5706 } |
| 5693 | 5707 |
| 5694 #undef __ | 5708 #undef __ |
| 5695 | 5709 |
| 5696 } // namespace internal | 5710 } // namespace internal |
| 5697 } // namespace v8 | 5711 } // namespace v8 |
| OLD | NEW |