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

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

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

Powered by Google App Engine
This is Rietveld 408576698