OLD | NEW |
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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 | 747 |
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) { |
| 758 VisitRRR(this, kMipsSubS, node); |
| 759 } |
757 | 760 |
758 void InstructionSelector::VisitFloat64Sub(Node* node) { | 761 void InstructionSelector::VisitFloat64Sub(Node* node) { |
759 MipsOperandGenerator g(this); | 762 MipsOperandGenerator g(this); |
760 Float64BinopMatcher m(node); | 763 Float64BinopMatcher m(node); |
761 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() && | 764 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() && |
762 CanCover(m.node(), m.right().node())) { | 765 CanCover(m.node(), m.right().node())) { |
763 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && | 766 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && |
764 CanCover(m.right().node(), m.right().InputAt(0))) { | 767 CanCover(m.right().node(), m.right().InputAt(0))) { |
765 Float64BinopMatcher mright0(m.right().InputAt(0)); | 768 Float64BinopMatcher mright0(m.right().InputAt(0)); |
766 if (mright0.left().IsMinusZero()) { | 769 if (mright0.left().IsMinusZero()) { |
767 Emit(kMipsFloat64RoundUp, g.DefineAsRegister(node), | 770 Emit(kMipsFloat64RoundUp, g.DefineAsRegister(node), |
768 g.UseRegister(mright0.right().node())); | 771 g.UseRegister(mright0.right().node())); |
769 return; | 772 return; |
770 } | 773 } |
771 } | 774 } |
772 } | 775 } |
773 VisitRRR(this, kMipsSubD, node); | 776 VisitRRR(this, kMipsSubD, node); |
774 } | 777 } |
775 | 778 |
| 779 void InstructionSelector::VisitFloat64SubPreserveNan(Node* node) { |
| 780 VisitRRR(this, kMipsSubD, node); |
| 781 } |
776 | 782 |
777 void InstructionSelector::VisitFloat32Mul(Node* node) { | 783 void InstructionSelector::VisitFloat32Mul(Node* node) { |
778 VisitRRR(this, kMipsMulS, node); | 784 VisitRRR(this, kMipsMulS, node); |
779 } | 785 } |
780 | 786 |
781 | 787 |
782 void InstructionSelector::VisitFloat64Mul(Node* node) { | 788 void InstructionSelector::VisitFloat64Mul(Node* node) { |
783 VisitRRR(this, kMipsMulD, node); | 789 VisitRRR(this, kMipsMulD, node); |
784 } | 790 } |
785 | 791 |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 MachineOperatorBuilder::kFloat32Max | | 1544 MachineOperatorBuilder::kFloat32Max | |
1539 MachineOperatorBuilder::kFloat32RoundDown | | 1545 MachineOperatorBuilder::kFloat32RoundDown | |
1540 MachineOperatorBuilder::kFloat32RoundUp | | 1546 MachineOperatorBuilder::kFloat32RoundUp | |
1541 MachineOperatorBuilder::kFloat32RoundTruncate | | 1547 MachineOperatorBuilder::kFloat32RoundTruncate | |
1542 MachineOperatorBuilder::kFloat32RoundTiesEven; | 1548 MachineOperatorBuilder::kFloat32RoundTiesEven; |
1543 } | 1549 } |
1544 | 1550 |
1545 } // namespace compiler | 1551 } // namespace compiler |
1546 } // namespace internal | 1552 } // namespace internal |
1547 } // namespace v8 | 1553 } // namespace v8 |
OLD | NEW |