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 3652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::DoMathExp(LMathExp* instr) { | 3672 void LCodeGen::DoMathExp(LMathExp* instr) { |
3673 DoubleRegister input = ToDoubleRegister(instr->value()); | 3673 __ PrepareCallCFunction(0, 1, scratch0()); |
3674 DoubleRegister result = ToDoubleRegister(instr->result()); | 3674 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
3675 DoubleRegister double_scratch1 = ToDoubleRegister(instr->double_temp()); | 3675 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); |
3676 DoubleRegister double_scratch2 = double_scratch0(); | 3676 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
3677 Register temp1 = ToRegister(instr->temp1()); | |
3678 Register temp2 = ToRegister(instr->temp2()); | |
3679 | |
3680 MathExpGenerator::EmitMathExp(masm(), input, result, double_scratch1, | |
3681 double_scratch2, temp1, temp2, scratch0()); | |
3682 } | 3677 } |
3683 | 3678 |
3684 void LCodeGen::DoMathLog(LMathLog* instr) { | 3679 void LCodeGen::DoMathLog(LMathLog* instr) { |
3685 __ PrepareCallCFunction(0, 1, scratch0()); | 3680 __ PrepareCallCFunction(0, 1, scratch0()); |
3686 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3681 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
3687 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0, 1); | 3682 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0, 1); |
3688 __ MovFromFloatResult(ToDoubleRegister(instr->result())); | 3683 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
3689 } | 3684 } |
3690 | 3685 |
3691 void LCodeGen::DoMathClz32(LMathClz32* instr) { | 3686 void LCodeGen::DoMathClz32(LMathClz32* instr) { |
(...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5693 __ LoadP(result, | 5688 __ LoadP(result, |
5694 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5689 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5695 __ bind(deferred->exit()); | 5690 __ bind(deferred->exit()); |
5696 __ bind(&done); | 5691 __ bind(&done); |
5697 } | 5692 } |
5698 | 5693 |
5699 #undef __ | 5694 #undef __ |
5700 | 5695 |
5701 } // namespace internal | 5696 } // namespace internal |
5702 } // namespace v8 | 5697 } // namespace v8 |
OLD | NEW |