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

Side by Side Diff: src/compiler/mips/instruction-selector-mips.cc

Issue 2066483008: MIPS: Followup '[turbofan] Introduce new operators Float32SubPreserveNan and Float64SubPreserveNan'. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment the iterpreter. 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 void InstructionSelector::VisitFloat64Add(Node* node) { 748 void InstructionSelector::VisitFloat64Add(Node* node) {
749 VisitRRR(this, kMipsAddD, node); 749 VisitRRR(this, kMipsAddD, node);
750 } 750 }
751 751
752 752
753 void InstructionSelector::VisitFloat32Sub(Node* node) { 753 void InstructionSelector::VisitFloat32Sub(Node* node) {
754 VisitRRR(this, kMipsSubS, node); 754 VisitRRR(this, kMipsSubS, node);
755 } 755 }
756 756
757 void InstructionSelector::VisitFloat32SubPreserveNan(Node* node) { 757 void InstructionSelector::VisitFloat32SubPreserveNan(Node* node) {
758 VisitRRR(this, kMipsSubS, node); 758 VisitRRR(this, kMipsSubPreserveNanS, node);
759 } 759 }
760 760
761 void InstructionSelector::VisitFloat64Sub(Node* node) { 761 void InstructionSelector::VisitFloat64Sub(Node* node) {
762 MipsOperandGenerator g(this); 762 MipsOperandGenerator g(this);
763 Float64BinopMatcher m(node); 763 Float64BinopMatcher m(node);
764 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() && 764 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() &&
765 CanCover(m.node(), m.right().node())) { 765 CanCover(m.node(), m.right().node())) {
766 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && 766 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub &&
767 CanCover(m.right().node(), m.right().InputAt(0))) { 767 CanCover(m.right().node(), m.right().InputAt(0))) {
768 Float64BinopMatcher mright0(m.right().InputAt(0)); 768 Float64BinopMatcher mright0(m.right().InputAt(0));
769 if (mright0.left().IsMinusZero()) { 769 if (mright0.left().IsMinusZero()) {
770 Emit(kMipsFloat64RoundUp, g.DefineAsRegister(node), 770 Emit(kMipsFloat64RoundUp, g.DefineAsRegister(node),
771 g.UseRegister(mright0.right().node())); 771 g.UseRegister(mright0.right().node()));
772 return; 772 return;
773 } 773 }
774 } 774 }
775 } 775 }
776 VisitRRR(this, kMipsSubD, node); 776 VisitRRR(this, kMipsSubD, node);
777 } 777 }
778 778
779 void InstructionSelector::VisitFloat64SubPreserveNan(Node* node) { 779 void InstructionSelector::VisitFloat64SubPreserveNan(Node* node) {
780 VisitRRR(this, kMipsSubD, node); 780 VisitRRR(this, kMipsSubPreserveNanD, node);
781 } 781 }
782 782
783 void InstructionSelector::VisitFloat32Mul(Node* node) { 783 void InstructionSelector::VisitFloat32Mul(Node* node) {
784 VisitRRR(this, kMipsMulS, node); 784 VisitRRR(this, kMipsMulS, node);
785 } 785 }
786 786
787 787
788 void InstructionSelector::VisitFloat64Mul(Node* node) { 788 void InstructionSelector::VisitFloat64Mul(Node* node) {
789 VisitRRR(this, kMipsMulD, node); 789 VisitRRR(this, kMipsMulD, node);
790 } 790 }
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || 1583 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) ||
1584 IsMipsArchVariant(kMips32r2)); 1584 IsMipsArchVariant(kMips32r2));
1585 return MachineOperatorBuilder::AlignmentRequirements:: 1585 return MachineOperatorBuilder::AlignmentRequirements::
1586 NoUnalignedAccessSupport(); 1586 NoUnalignedAccessSupport();
1587 } 1587 }
1588 } 1588 }
1589 1589
1590 } // namespace compiler 1590 } // namespace compiler
1591 } // namespace internal 1591 } // namespace internal
1592 } // namespace v8 1592 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-codes-mips.h ('k') | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698