| 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/graph.h" | 7 #include "src/compiler/graph.h" | 
| 8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" | 
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" | 
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" | 
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 596       return kMachFloat32; | 596       return kMachFloat32; | 
| 597     case IrOpcode::kTruncateFloat64ToInt32: | 597     case IrOpcode::kTruncateFloat64ToInt32: | 
| 598     case IrOpcode::kTruncateInt64ToInt32: | 598     case IrOpcode::kTruncateInt64ToInt32: | 
| 599       return kMachInt32; | 599       return kMachInt32; | 
| 600     case IrOpcode::kFloat64Add: | 600     case IrOpcode::kFloat64Add: | 
| 601     case IrOpcode::kFloat64Sub: | 601     case IrOpcode::kFloat64Sub: | 
| 602     case IrOpcode::kFloat64Mul: | 602     case IrOpcode::kFloat64Mul: | 
| 603     case IrOpcode::kFloat64Div: | 603     case IrOpcode::kFloat64Div: | 
| 604     case IrOpcode::kFloat64Mod: | 604     case IrOpcode::kFloat64Mod: | 
| 605     case IrOpcode::kFloat64Sqrt: | 605     case IrOpcode::kFloat64Sqrt: | 
|  | 606     case IrOpcode::kFloat64Floor: | 
|  | 607     case IrOpcode::kFloat64Ceil: | 
|  | 608     case IrOpcode::kFloat64RoundTruncate: | 
|  | 609     case IrOpcode::kFloat64RoundTiesAway: | 
| 606       return kMachFloat64; | 610       return kMachFloat64; | 
| 607     case IrOpcode::kFloat64Equal: | 611     case IrOpcode::kFloat64Equal: | 
| 608     case IrOpcode::kFloat64LessThan: | 612     case IrOpcode::kFloat64LessThan: | 
| 609     case IrOpcode::kFloat64LessThanOrEqual: | 613     case IrOpcode::kFloat64LessThanOrEqual: | 
| 610       return kMachBool; | 614       return kMachBool; | 
| 611     default: | 615     default: | 
| 612       V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | 616       V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | 
| 613                node->opcode(), node->op()->mnemonic(), node->id()); | 617                node->opcode(), node->op()->mnemonic(), node->id()); | 
| 614   } | 618   } | 
| 615   return kMachNone; | 619   return kMachNone; | 
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 785     case IrOpcode::kFloat64Mod: | 789     case IrOpcode::kFloat64Mod: | 
| 786       return MarkAsDouble(node), VisitFloat64Mod(node); | 790       return MarkAsDouble(node), VisitFloat64Mod(node); | 
| 787     case IrOpcode::kFloat64Sqrt: | 791     case IrOpcode::kFloat64Sqrt: | 
| 788       return MarkAsDouble(node), VisitFloat64Sqrt(node); | 792       return MarkAsDouble(node), VisitFloat64Sqrt(node); | 
| 789     case IrOpcode::kFloat64Equal: | 793     case IrOpcode::kFloat64Equal: | 
| 790       return VisitFloat64Equal(node); | 794       return VisitFloat64Equal(node); | 
| 791     case IrOpcode::kFloat64LessThan: | 795     case IrOpcode::kFloat64LessThan: | 
| 792       return VisitFloat64LessThan(node); | 796       return VisitFloat64LessThan(node); | 
| 793     case IrOpcode::kFloat64LessThanOrEqual: | 797     case IrOpcode::kFloat64LessThanOrEqual: | 
| 794       return VisitFloat64LessThanOrEqual(node); | 798       return VisitFloat64LessThanOrEqual(node); | 
|  | 799     case IrOpcode::kFloat64Floor: | 
|  | 800       return MarkAsDouble(node), VisitFloat64Floor(node); | 
|  | 801     case IrOpcode::kFloat64Ceil: | 
|  | 802       return MarkAsDouble(node), VisitFloat64Ceil(node); | 
|  | 803     case IrOpcode::kFloat64RoundTruncate: | 
|  | 804       return MarkAsDouble(node), VisitFloat64RoundTruncate(node); | 
|  | 805     case IrOpcode::kFloat64RoundTiesAway: | 
|  | 806       return MarkAsDouble(node), VisitFloat64RoundTiesAway(node); | 
| 795     case IrOpcode::kLoadStackPointer: | 807     case IrOpcode::kLoadStackPointer: | 
| 796       return VisitLoadStackPointer(node); | 808       return VisitLoadStackPointer(node); | 
| 797     default: | 809     default: | 
| 798       V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | 810       UNSUPPORTED_OPERATOR(node); | 
| 799                node->opcode(), node->op()->mnemonic(), node->id()); | 811       break; | 
| 800   } | 812   } | 
| 801 } | 813 } | 
| 802 | 814 | 
| 803 | 815 | 
| 804 #if V8_TURBOFAN_BACKEND | 816 #if V8_TURBOFAN_BACKEND | 
| 805 | 817 | 
| 806 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { | 818 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { | 
| 807   OperandGenerator g(this); | 819   OperandGenerator g(this); | 
| 808   Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), | 820   Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), | 
| 809        g.UseRegister(node->InputAt(0))); | 821        g.UseRegister(node->InputAt(0))); | 
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1099 MachineOperatorBuilder::Flags | 1111 MachineOperatorBuilder::Flags | 
| 1100 InstructionSelector::SupportedMachineOperatorFlags() { | 1112 InstructionSelector::SupportedMachineOperatorFlags() { | 
| 1101   return MachineOperatorBuilder::Flag::kNoFlags; | 1113   return MachineOperatorBuilder::Flag::kNoFlags; | 
| 1102 } | 1114 } | 
| 1103 | 1115 | 
| 1104 #endif  // !V8_TURBOFAN_BACKEND | 1116 #endif  // !V8_TURBOFAN_BACKEND | 
| 1105 | 1117 | 
| 1106 }  // namespace compiler | 1118 }  // namespace compiler | 
| 1107 }  // namespace internal | 1119 }  // namespace internal | 
| 1108 }  // namespace v8 | 1120 }  // namespace v8 | 
| OLD | NEW | 
|---|