Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 2078273002: PPC/s390: [builtins] Introduce proper Float64Cos and Float64Sin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/s390/code-generator-s390.cc ('k') | src/crankshaft/ppc/lithium-ppc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/s390/code-generator-s390.cc ('k') | src/crankshaft/ppc/lithium-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698