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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 case IrOpcode::kChangeUint32ToFloat64: | 580 case IrOpcode::kChangeUint32ToFloat64: |
581 return MarkAsDouble(node), VisitChangeUint32ToFloat64(node); | 581 return MarkAsDouble(node), VisitChangeUint32ToFloat64(node); |
582 case IrOpcode::kChangeFloat64ToInt32: | 582 case IrOpcode::kChangeFloat64ToInt32: |
583 return VisitChangeFloat64ToInt32(node); | 583 return VisitChangeFloat64ToInt32(node); |
584 case IrOpcode::kChangeFloat64ToUint32: | 584 case IrOpcode::kChangeFloat64ToUint32: |
585 return VisitChangeFloat64ToUint32(node); | 585 return VisitChangeFloat64ToUint32(node); |
586 case IrOpcode::kChangeInt32ToInt64: | 586 case IrOpcode::kChangeInt32ToInt64: |
587 return VisitChangeInt32ToInt64(node); | 587 return VisitChangeInt32ToInt64(node); |
588 case IrOpcode::kChangeUint32ToUint64: | 588 case IrOpcode::kChangeUint32ToUint64: |
589 return VisitChangeUint32ToUint64(node); | 589 return VisitChangeUint32ToUint64(node); |
| 590 case IrOpcode::kTruncateFloat64ToInt32: |
| 591 return VisitTruncateFloat64ToInt32(node); |
590 case IrOpcode::kTruncateInt64ToInt32: | 592 case IrOpcode::kTruncateInt64ToInt32: |
591 return VisitTruncateInt64ToInt32(node); | 593 return VisitTruncateInt64ToInt32(node); |
592 case IrOpcode::kFloat64Add: | 594 case IrOpcode::kFloat64Add: |
593 return MarkAsDouble(node), VisitFloat64Add(node); | 595 return MarkAsDouble(node), VisitFloat64Add(node); |
594 case IrOpcode::kFloat64Sub: | 596 case IrOpcode::kFloat64Sub: |
595 return MarkAsDouble(node), VisitFloat64Sub(node); | 597 return MarkAsDouble(node), VisitFloat64Sub(node); |
596 case IrOpcode::kFloat64Mul: | 598 case IrOpcode::kFloat64Mul: |
597 return MarkAsDouble(node), VisitFloat64Mul(node); | 599 return MarkAsDouble(node), VisitFloat64Mul(node); |
598 case IrOpcode::kFloat64Div: | 600 case IrOpcode::kFloat64Div: |
599 return MarkAsDouble(node), VisitFloat64Div(node); | 601 return MarkAsDouble(node), VisitFloat64Div(node); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 VisitWord64Compare(node, &cont); | 685 VisitWord64Compare(node, &cont); |
684 } | 686 } |
685 | 687 |
686 | 688 |
687 void InstructionSelector::VisitInt64LessThanOrEqual(Node* node) { | 689 void InstructionSelector::VisitInt64LessThanOrEqual(Node* node) { |
688 FlagsContinuation cont(kSignedLessThanOrEqual, node); | 690 FlagsContinuation cont(kSignedLessThanOrEqual, node); |
689 VisitWord64Compare(node, &cont); | 691 VisitWord64Compare(node, &cont); |
690 } | 692 } |
691 | 693 |
692 | 694 |
| 695 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { |
| 696 OperandGenerator g(this); |
| 697 Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), |
| 698 g.UseDoubleRegister(node->InputAt(0))); |
| 699 } |
| 700 |
| 701 |
693 void InstructionSelector::VisitFloat64Equal(Node* node) { | 702 void InstructionSelector::VisitFloat64Equal(Node* node) { |
694 FlagsContinuation cont(kUnorderedEqual, node); | 703 FlagsContinuation cont(kUnorderedEqual, node); |
695 VisitFloat64Compare(node, &cont); | 704 VisitFloat64Compare(node, &cont); |
696 } | 705 } |
697 | 706 |
698 | 707 |
699 void InstructionSelector::VisitFloat64LessThan(Node* node) { | 708 void InstructionSelector::VisitFloat64LessThan(Node* node) { |
700 FlagsContinuation cont(kUnorderedLessThan, node); | 709 FlagsContinuation cont(kUnorderedLessThan, node); |
701 VisitFloat64Compare(node, &cont); | 710 VisitFloat64Compare(node, &cont); |
702 } | 711 } |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 | 1067 |
1059 | 1068 |
1060 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, | 1069 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, |
1061 BasicBlock* deoptimization) {} | 1070 BasicBlock* deoptimization) {} |
1062 | 1071 |
1063 #endif // !V8_TURBOFAN_BACKEND | 1072 #endif // !V8_TURBOFAN_BACKEND |
1064 | 1073 |
1065 } // namespace compiler | 1074 } // namespace compiler |
1066 } // namespace internal | 1075 } // namespace internal |
1067 } // namespace v8 | 1076 } // namespace v8 |
OLD | NEW |