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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3474 matching lines...) Expand 10 before | Expand all | Expand 10 after
3485 __ CallStub(&stub); 3485 __ CallStub(&stub);
3486 } else { 3486 } else {
3487 DCHECK(exponent_type.IsDouble()); 3487 DCHECK(exponent_type.IsDouble());
3488 MathPowStub stub(isolate(), MathPowStub::DOUBLE); 3488 MathPowStub stub(isolate(), MathPowStub::DOUBLE);
3489 __ CallStub(&stub); 3489 __ CallStub(&stub);
3490 } 3490 }
3491 } 3491 }
3492 3492
3493 3493
3494 void LCodeGen::DoMathExp(LMathExp* instr) { 3494 void LCodeGen::DoMathExp(LMathExp* instr) {
3495 DoubleRegister input = ToDoubleRegister(instr->value()); 3495 __ PrepareCallCFunction(0, 1, scratch0());
3496 DoubleRegister result = ToDoubleRegister(instr->result()); 3496 __ MovToFloatParameter(ToDoubleRegister(instr->value()));
3497 DoubleRegister double_scratch1 = ToDoubleRegister(instr->double_temp()); 3497 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1);
3498 DoubleRegister double_scratch2 = double_scratch0(); 3498 __ MovFromFloatResult(ToDoubleRegister(instr->result()));
3499 Register temp1 = ToRegister(instr->temp1());
3500 Register temp2 = ToRegister(instr->temp2());
3501
3502 MathExpGenerator::EmitMathExp(
3503 masm(), input, result, double_scratch1, double_scratch2,
3504 temp1, temp2, scratch0());
3505 } 3499 }
3506 3500
3507 3501
3508 void LCodeGen::DoMathLog(LMathLog* instr) { 3502 void LCodeGen::DoMathLog(LMathLog* instr) {
3509 __ PrepareCallCFunction(0, 1, scratch0()); 3503 __ PrepareCallCFunction(0, 1, scratch0());
3510 __ MovToFloatParameter(ToDoubleRegister(instr->value())); 3504 __ MovToFloatParameter(ToDoubleRegister(instr->value()));
3511 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0, 1); 3505 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0, 1);
3512 __ MovFromFloatResult(ToDoubleRegister(instr->result())); 3506 __ MovFromFloatResult(ToDoubleRegister(instr->result()));
3513 } 3507 }
3514 3508
(...skipping 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after
5547 __ lw(result, FieldMemOperand(scratch, 5541 __ lw(result, FieldMemOperand(scratch,
5548 FixedArray::kHeaderSize - kPointerSize)); 5542 FixedArray::kHeaderSize - kPointerSize));
5549 __ bind(deferred->exit()); 5543 __ bind(deferred->exit());
5550 __ bind(&done); 5544 __ bind(&done);
5551 } 5545 }
5552 5546
5553 #undef __ 5547 #undef __
5554 5548
5555 } // namespace internal 5549 } // namespace internal
5556 } // namespace v8 5550 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698