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

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

Issue 2073123002: [builtins] Introduce proper Float64Cos and Float64Sin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix missing breaks 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/crankshaft/ia32/lithium-ia32.cc ('k') | src/crankshaft/mips/lithium-mips.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 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 3472 matching lines...) Expand 10 before | Expand all | Expand 10 after
3483 } else if (exponent_type.IsInteger32()) { 3483 } else if (exponent_type.IsInteger32()) {
3484 MathPowStub stub(isolate(), MathPowStub::INTEGER); 3484 MathPowStub stub(isolate(), MathPowStub::INTEGER);
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 void LCodeGen::DoMathCos(LMathCos* instr) {
3494 __ PrepareCallCFunction(0, 1, scratch0());
3495 __ MovToFloatParameter(ToDoubleRegister(instr->value()));
3496 __ CallCFunction(ExternalReference::ieee754_cos_function(isolate()), 0, 1);
3497 __ MovFromFloatResult(ToDoubleRegister(instr->result()));
3498 }
3499
3500 void LCodeGen::DoMathSin(LMathSin* instr) {
3501 __ PrepareCallCFunction(0, 1, scratch0());
3502 __ MovToFloatParameter(ToDoubleRegister(instr->value()));
3503 __ CallCFunction(ExternalReference::ieee754_sin_function(isolate()), 0, 1);
3504 __ MovFromFloatResult(ToDoubleRegister(instr->result()));
3505 }
3493 3506
3494 void LCodeGen::DoMathExp(LMathExp* instr) { 3507 void LCodeGen::DoMathExp(LMathExp* instr) {
3495 __ PrepareCallCFunction(0, 1, scratch0()); 3508 __ PrepareCallCFunction(0, 1, scratch0());
3496 __ MovToFloatParameter(ToDoubleRegister(instr->value())); 3509 __ MovToFloatParameter(ToDoubleRegister(instr->value()));
3497 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1); 3510 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 0, 1);
3498 __ MovFromFloatResult(ToDoubleRegister(instr->result())); 3511 __ MovFromFloatResult(ToDoubleRegister(instr->result()));
3499 } 3512 }
3500 3513
3501 3514
3502 void LCodeGen::DoMathLog(LMathLog* instr) { 3515 void LCodeGen::DoMathLog(LMathLog* instr) {
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after
5541 __ lw(result, FieldMemOperand(scratch, 5554 __ lw(result, FieldMemOperand(scratch,
5542 FixedArray::kHeaderSize - kPointerSize)); 5555 FixedArray::kHeaderSize - kPointerSize));
5543 __ bind(deferred->exit()); 5556 __ bind(deferred->exit());
5544 __ bind(&done); 5557 __ bind(&done);
5545 } 5558 }
5546 5559
5547 #undef __ 5560 #undef __
5548 5561
5549 } // namespace internal 5562 } // namespace internal
5550 } // namespace v8 5563 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-ia32.cc ('k') | src/crankshaft/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698