Chromium Code Reviews| 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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 547 return kMachFloat32; | 547 return kMachFloat32; |
| 548 case IrOpcode::kTruncateFloat64ToInt32: | 548 case IrOpcode::kTruncateFloat64ToInt32: |
| 549 case IrOpcode::kTruncateInt64ToInt32: | 549 case IrOpcode::kTruncateInt64ToInt32: |
| 550 return kMachInt32; | 550 return kMachInt32; |
| 551 case IrOpcode::kFloat64Add: | 551 case IrOpcode::kFloat64Add: |
| 552 case IrOpcode::kFloat64Sub: | 552 case IrOpcode::kFloat64Sub: |
| 553 case IrOpcode::kFloat64Mul: | 553 case IrOpcode::kFloat64Mul: |
| 554 case IrOpcode::kFloat64Div: | 554 case IrOpcode::kFloat64Div: |
| 555 case IrOpcode::kFloat64Mod: | 555 case IrOpcode::kFloat64Mod: |
| 556 case IrOpcode::kFloat64Sqrt: | 556 case IrOpcode::kFloat64Sqrt: |
| 557 case IrOpcode::kFloat64Floor: | |
| 558 case IrOpcode::kFloat64Ceil: | |
| 559 case IrOpcode::kFloat64RoundTruncate: | |
| 560 case IrOpcode::kFloat64RoundTiesAway: | |
| 557 return kMachFloat64; | 561 return kMachFloat64; |
| 558 case IrOpcode::kFloat64Equal: | 562 case IrOpcode::kFloat64Equal: |
| 559 case IrOpcode::kFloat64LessThan: | 563 case IrOpcode::kFloat64LessThan: |
| 560 case IrOpcode::kFloat64LessThanOrEqual: | 564 case IrOpcode::kFloat64LessThanOrEqual: |
| 561 return kMachBool; | 565 return kMachBool; |
| 562 default: | 566 default: |
| 563 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | 567 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", |
| 564 node->opcode(), node->op()->mnemonic(), node->id()); | 568 node->opcode(), node->op()->mnemonic(), node->id()); |
| 565 } | 569 } |
| 566 return kMachNone; | 570 return kMachNone; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 736 case IrOpcode::kFloat64Mod: | 740 case IrOpcode::kFloat64Mod: |
| 737 return MarkAsDouble(node), VisitFloat64Mod(node); | 741 return MarkAsDouble(node), VisitFloat64Mod(node); |
| 738 case IrOpcode::kFloat64Sqrt: | 742 case IrOpcode::kFloat64Sqrt: |
| 739 return MarkAsDouble(node), VisitFloat64Sqrt(node); | 743 return MarkAsDouble(node), VisitFloat64Sqrt(node); |
| 740 case IrOpcode::kFloat64Equal: | 744 case IrOpcode::kFloat64Equal: |
| 741 return VisitFloat64Equal(node); | 745 return VisitFloat64Equal(node); |
| 742 case IrOpcode::kFloat64LessThan: | 746 case IrOpcode::kFloat64LessThan: |
| 743 return VisitFloat64LessThan(node); | 747 return VisitFloat64LessThan(node); |
| 744 case IrOpcode::kFloat64LessThanOrEqual: | 748 case IrOpcode::kFloat64LessThanOrEqual: |
| 745 return VisitFloat64LessThanOrEqual(node); | 749 return VisitFloat64LessThanOrEqual(node); |
| 750 case IrOpcode::kFloat64Floor: | |
| 751 return MarkAsDouble(node), VisitFloat64Floor(node); | |
| 752 case IrOpcode::kFloat64Ceil: | |
| 753 return MarkAsDouble(node), VisitFloat64Ceil(node); | |
| 754 case IrOpcode::kFloat64RoundTruncate: | |
| 755 return MarkAsDouble(node), VisitFloat64RoundTruncate(node); | |
| 756 case IrOpcode::kFloat64RoundTiesAway: | |
| 757 return MarkAsDouble(node), VisitFloat64RoundTiesAway(node); | |
| 746 case IrOpcode::kLoadStackPointer: | 758 case IrOpcode::kLoadStackPointer: |
| 747 return VisitLoadStackPointer(node); | 759 return VisitLoadStackPointer(node); |
| 748 default: | 760 default: |
| 749 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | 761 UnsupportedOperator(node); |
| 750 node->opcode(), node->op()->mnemonic(), node->id()); | 762 break; |
| 751 } | 763 } |
| 752 } | 764 } |
| 753 | 765 |
| 754 | 766 |
| 767 void InstructionSelector::UnsupportedOperator(Node* node) { | |
| 768 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | |
| 769 node->opcode(), node->op()->mnemonic(), node->id()); | |
| 770 } | |
| 771 | |
|
Benedikt Meurer
2014/10/26 12:48:05
Nit: missing newline.
sigurds
2014/10/28 12:47:22
Done.
| |
| 755 #if V8_TURBOFAN_BACKEND | 772 #if V8_TURBOFAN_BACKEND |
| 756 | 773 |
| 757 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { | 774 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { |
| 758 OperandGenerator g(this); | 775 OperandGenerator g(this); |
| 759 Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), | 776 Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), |
| 760 g.UseRegister(node->InputAt(0))); | 777 g.UseRegister(node->InputAt(0))); |
| 761 } | 778 } |
| 762 | 779 |
| 763 | 780 |
| 764 void InstructionSelector::VisitLoadStackPointer(Node* node) { | 781 void InstructionSelector::VisitLoadStackPointer(Node* node) { |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1040 void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch, | 1057 void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch, |
| 1041 BasicBlock* fbranch) { | 1058 BasicBlock* fbranch) { |
| 1042 UNIMPLEMENTED(); | 1059 UNIMPLEMENTED(); |
| 1043 } | 1060 } |
| 1044 | 1061 |
| 1045 #endif // !V8_TURBOFAN_BACKEND | 1062 #endif // !V8_TURBOFAN_BACKEND |
| 1046 | 1063 |
| 1047 } // namespace compiler | 1064 } // namespace compiler |
| 1048 } // namespace internal | 1065 } // namespace internal |
| 1049 } // namespace v8 | 1066 } // namespace v8 |
| OLD | NEW |