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

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

Issue 2285703002: MIPS: Use neg instruction in r6 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 3 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/mips/lithium-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('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. 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 3631 matching lines...) Expand 10 before | Expand all | Expand 10 after
3642 DoubleRegister result = ToDoubleRegister(instr->result()); 3642 DoubleRegister result = ToDoubleRegister(instr->result());
3643 DoubleRegister temp = ToDoubleRegister(instr->temp()); 3643 DoubleRegister temp = ToDoubleRegister(instr->temp());
3644 3644
3645 DCHECK(!input.is(result)); 3645 DCHECK(!input.is(result));
3646 3646
3647 // Note that according to ECMA-262 15.8.2.13: 3647 // Note that according to ECMA-262 15.8.2.13:
3648 // Math.pow(-Infinity, 0.5) == Infinity 3648 // Math.pow(-Infinity, 0.5) == Infinity
3649 // Math.sqrt(-Infinity) == NaN 3649 // Math.sqrt(-Infinity) == NaN
3650 Label done; 3650 Label done;
3651 __ Move(temp, static_cast<double>(-V8_INFINITY)); 3651 __ Move(temp, static_cast<double>(-V8_INFINITY));
3652 // Set up Infinity.
3652 __ Neg_d(result, temp); 3653 __ Neg_d(result, temp);
3654 // result is overwritten if the branch is not taken.
3653 __ BranchF(&done, NULL, eq, temp, input); 3655 __ BranchF(&done, NULL, eq, temp, input);
3654 3656
3655 // Add +0 to convert -0 to +0. 3657 // Add +0 to convert -0 to +0.
3656 __ add_d(result, input, kDoubleRegZero); 3658 __ add_d(result, input, kDoubleRegZero);
3657 __ sqrt_d(result, result); 3659 __ sqrt_d(result, result);
3658 __ bind(&done); 3660 __ bind(&done);
3659 } 3661 }
3660 3662
3661 3663
3662 void LCodeGen::DoPower(LPower* instr) { 3664 void LCodeGen::DoPower(LPower* instr) {
(...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after
5741 __ ld(result, FieldMemOperand(scratch, 5743 __ ld(result, FieldMemOperand(scratch,
5742 FixedArray::kHeaderSize - kPointerSize)); 5744 FixedArray::kHeaderSize - kPointerSize));
5743 __ bind(deferred->exit()); 5745 __ bind(deferred->exit());
5744 __ bind(&done); 5746 __ bind(&done);
5745 } 5747 }
5746 5748
5747 #undef __ 5749 #undef __
5748 5750
5749 } // namespace internal 5751 } // namespace internal
5750 } // namespace v8 5752 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698