| 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/compiler/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
| 6 | 6 |
| 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-inl.h" | 9 #include "src/compiler/node-properties-inl.h" |
| 10 #include "src/compiler/pipeline.h" | 10 #include "src/compiler/pipeline.h" |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 case IrOpcode::kInt64UDiv: | 565 case IrOpcode::kInt64UDiv: |
| 566 return VisitInt64UDiv(node); | 566 return VisitInt64UDiv(node); |
| 567 case IrOpcode::kInt64Mod: | 567 case IrOpcode::kInt64Mod: |
| 568 return VisitInt64Mod(node); | 568 return VisitInt64Mod(node); |
| 569 case IrOpcode::kInt64UMod: | 569 case IrOpcode::kInt64UMod: |
| 570 return VisitInt64UMod(node); | 570 return VisitInt64UMod(node); |
| 571 case IrOpcode::kInt64LessThan: | 571 case IrOpcode::kInt64LessThan: |
| 572 return VisitInt64LessThan(node); | 572 return VisitInt64LessThan(node); |
| 573 case IrOpcode::kInt64LessThanOrEqual: | 573 case IrOpcode::kInt64LessThanOrEqual: |
| 574 return VisitInt64LessThanOrEqual(node); | 574 return VisitInt64LessThanOrEqual(node); |
| 575 case IrOpcode::kUint64LessThan: |
| 576 return VisitUint64LessThan(node); |
| 575 case IrOpcode::kChangeFloat32ToFloat64: | 577 case IrOpcode::kChangeFloat32ToFloat64: |
| 576 return MarkAsDouble(node), VisitChangeFloat32ToFloat64(node); | 578 return MarkAsDouble(node), VisitChangeFloat32ToFloat64(node); |
| 577 case IrOpcode::kChangeInt32ToFloat64: | 579 case IrOpcode::kChangeInt32ToFloat64: |
| 578 return MarkAsDouble(node), VisitChangeInt32ToFloat64(node); | 580 return MarkAsDouble(node), VisitChangeInt32ToFloat64(node); |
| 579 case IrOpcode::kChangeUint32ToFloat64: | 581 case IrOpcode::kChangeUint32ToFloat64: |
| 580 return MarkAsDouble(node), VisitChangeUint32ToFloat64(node); | 582 return MarkAsDouble(node), VisitChangeUint32ToFloat64(node); |
| 581 case IrOpcode::kChangeFloat64ToInt32: | 583 case IrOpcode::kChangeFloat64ToInt32: |
| 582 return VisitChangeFloat64ToInt32(node); | 584 return VisitChangeFloat64ToInt32(node); |
| 583 case IrOpcode::kChangeFloat64ToUint32: | 585 case IrOpcode::kChangeFloat64ToUint32: |
| 584 return VisitChangeFloat64ToUint32(node); | 586 return VisitChangeFloat64ToUint32(node); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 VisitWord64Compare(node, &cont); | 690 VisitWord64Compare(node, &cont); |
| 689 } | 691 } |
| 690 | 692 |
| 691 | 693 |
| 692 void InstructionSelector::VisitInt64LessThanOrEqual(Node* node) { | 694 void InstructionSelector::VisitInt64LessThanOrEqual(Node* node) { |
| 693 FlagsContinuation cont(kSignedLessThanOrEqual, node); | 695 FlagsContinuation cont(kSignedLessThanOrEqual, node); |
| 694 VisitWord64Compare(node, &cont); | 696 VisitWord64Compare(node, &cont); |
| 695 } | 697 } |
| 696 | 698 |
| 697 | 699 |
| 700 void InstructionSelector::VisitUint64LessThan(Node* node) { |
| 701 FlagsContinuation cont(kUnsignedLessThan, node); |
| 702 VisitWord64Compare(node, &cont); |
| 703 } |
| 704 |
| 705 |
| 698 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { | 706 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { |
| 699 OperandGenerator g(this); | 707 OperandGenerator g(this); |
| 700 Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), | 708 Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), |
| 701 g.UseRegister(node->InputAt(0))); | 709 g.UseRegister(node->InputAt(0))); |
| 702 } | 710 } |
| 703 | 711 |
| 704 | 712 |
| 705 void InstructionSelector::VisitFloat64Equal(Node* node) { | 713 void InstructionSelector::VisitFloat64Equal(Node* node) { |
| 706 FlagsContinuation cont(kUnorderedEqual, node); | 714 FlagsContinuation cont(kUnorderedEqual, node); |
| 707 VisitFloat64Compare(node, &cont); | 715 VisitFloat64Compare(node, &cont); |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 return VisitWord32Compare(value, &cont); | 930 return VisitWord32Compare(value, &cont); |
| 923 case IrOpcode::kWord64Equal: | 931 case IrOpcode::kWord64Equal: |
| 924 cont.OverwriteAndNegateIfEqual(kEqual); | 932 cont.OverwriteAndNegateIfEqual(kEqual); |
| 925 return VisitWord64Compare(value, &cont); | 933 return VisitWord64Compare(value, &cont); |
| 926 case IrOpcode::kInt64LessThan: | 934 case IrOpcode::kInt64LessThan: |
| 927 cont.OverwriteAndNegateIfEqual(kSignedLessThan); | 935 cont.OverwriteAndNegateIfEqual(kSignedLessThan); |
| 928 return VisitWord64Compare(value, &cont); | 936 return VisitWord64Compare(value, &cont); |
| 929 case IrOpcode::kInt64LessThanOrEqual: | 937 case IrOpcode::kInt64LessThanOrEqual: |
| 930 cont.OverwriteAndNegateIfEqual(kSignedLessThanOrEqual); | 938 cont.OverwriteAndNegateIfEqual(kSignedLessThanOrEqual); |
| 931 return VisitWord64Compare(value, &cont); | 939 return VisitWord64Compare(value, &cont); |
| 940 case IrOpcode::kUint64LessThan: |
| 941 cont.OverwriteAndNegateIfEqual(kUnsignedLessThan); |
| 942 return VisitWord64Compare(value, &cont); |
| 932 case IrOpcode::kFloat64Equal: | 943 case IrOpcode::kFloat64Equal: |
| 933 cont.OverwriteAndNegateIfEqual(kUnorderedEqual); | 944 cont.OverwriteAndNegateIfEqual(kUnorderedEqual); |
| 934 return VisitFloat64Compare(value, &cont); | 945 return VisitFloat64Compare(value, &cont); |
| 935 case IrOpcode::kFloat64LessThan: | 946 case IrOpcode::kFloat64LessThan: |
| 936 cont.OverwriteAndNegateIfEqual(kUnorderedLessThan); | 947 cont.OverwriteAndNegateIfEqual(kUnorderedLessThan); |
| 937 return VisitFloat64Compare(value, &cont); | 948 return VisitFloat64Compare(value, &cont); |
| 938 case IrOpcode::kFloat64LessThanOrEqual: | 949 case IrOpcode::kFloat64LessThanOrEqual: |
| 939 cont.OverwriteAndNegateIfEqual(kUnorderedLessThanOrEqual); | 950 cont.OverwriteAndNegateIfEqual(kUnorderedLessThanOrEqual); |
| 940 return VisitFloat64Compare(value, &cont); | 951 return VisitFloat64Compare(value, &cont); |
| 941 case IrOpcode::kProjection: | 952 case IrOpcode::kProjection: |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 | 1109 |
| 1099 | 1110 |
| 1100 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, | 1111 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, |
| 1101 BasicBlock* deoptimization) {} | 1112 BasicBlock* deoptimization) {} |
| 1102 | 1113 |
| 1103 #endif // !V8_TURBOFAN_BACKEND | 1114 #endif // !V8_TURBOFAN_BACKEND |
| 1104 | 1115 |
| 1105 } // namespace compiler | 1116 } // namespace compiler |
| 1106 } // namespace internal | 1117 } // namespace internal |
| 1107 } // namespace v8 | 1118 } // namespace v8 |
| OLD | NEW |