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

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

Issue 2077533002: [builtins] Introduce proper Float64Exp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Import tests from Raymond. 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
OLDNEW
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 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 3696
3697 void LCodeGen::DoMathExp(LMathExp* instr) { 3697 void LCodeGen::DoMathExp(LMathExp* instr) {
3698 DoubleRegister input = ToDoubleRegister(instr->value()); 3698 __ PrepareCallCFunction(0, 1, scratch0());
3699 DoubleRegister result = ToDoubleRegister(instr->result()); 3699 __ MovToFloatParameter(ToDoubleRegister(instr->value()));
3700 DoubleRegister double_scratch1 = ToDoubleRegister(instr->double_temp()); 3700 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1);
3701 DoubleRegister double_scratch2 = double_scratch0(); 3701 __ MovFromFloatResult(ToDoubleRegister(instr->result()));
3702 Register temp1 = ToRegister(instr->temp1());
3703 Register temp2 = ToRegister(instr->temp2());
3704
3705 MathExpGenerator::EmitMathExp(
3706 masm(), input, result, double_scratch1, double_scratch2,
3707 temp1, temp2, scratch0());
3708 } 3702 }
3709 3703
3710 3704
3711 void LCodeGen::DoMathLog(LMathLog* instr) { 3705 void LCodeGen::DoMathLog(LMathLog* instr) {
3712 __ PrepareCallCFunction(0, 1, scratch0()); 3706 __ PrepareCallCFunction(0, 1, scratch0());
3713 __ MovToFloatParameter(ToDoubleRegister(instr->value())); 3707 __ MovToFloatParameter(ToDoubleRegister(instr->value()));
3714 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0, 1); 3708 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0, 1);
3715 __ MovFromFloatResult(ToDoubleRegister(instr->result())); 3709 __ MovFromFloatResult(ToDoubleRegister(instr->result()));
3716 } 3710 }
3717 3711
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after
5751 __ ld(result, FieldMemOperand(scratch, 5745 __ ld(result, FieldMemOperand(scratch,
5752 FixedArray::kHeaderSize - kPointerSize)); 5746 FixedArray::kHeaderSize - kPointerSize));
5753 __ bind(deferred->exit()); 5747 __ bind(deferred->exit());
5754 __ bind(&done); 5748 __ bind(&done);
5755 } 5749 }
5756 5750
5757 #undef __ 5751 #undef __
5758 5752
5759 } // namespace internal 5753 } // namespace internal
5760 } // namespace v8 5754 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698