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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 case IrOpcode::kUint32LessThan: | 829 case IrOpcode::kUint32LessThan: |
830 return VisitUint32LessThan(node); | 830 return VisitUint32LessThan(node); |
831 case IrOpcode::kUint32LessThanOrEqual: | 831 case IrOpcode::kUint32LessThanOrEqual: |
832 return VisitUint32LessThanOrEqual(node); | 832 return VisitUint32LessThanOrEqual(node); |
833 case IrOpcode::kUint32Mod: | 833 case IrOpcode::kUint32Mod: |
834 return MarkAsWord32(node), VisitUint32Mod(node); | 834 return MarkAsWord32(node), VisitUint32Mod(node); |
835 case IrOpcode::kUint32MulHigh: | 835 case IrOpcode::kUint32MulHigh: |
836 return VisitUint32MulHigh(node); | 836 return VisitUint32MulHigh(node); |
837 case IrOpcode::kInt64Add: | 837 case IrOpcode::kInt64Add: |
838 return MarkAsWord64(node), VisitInt64Add(node); | 838 return MarkAsWord64(node), VisitInt64Add(node); |
| 839 case IrOpcode::kInt64AddWithOverflow: |
| 840 return MarkAsWord64(node), VisitInt64AddWithOverflow(node); |
839 case IrOpcode::kInt64Sub: | 841 case IrOpcode::kInt64Sub: |
840 return MarkAsWord64(node), VisitInt64Sub(node); | 842 return MarkAsWord64(node), VisitInt64Sub(node); |
| 843 case IrOpcode::kInt64SubWithOverflow: |
| 844 return MarkAsWord64(node), VisitInt64SubWithOverflow(node); |
841 case IrOpcode::kInt64Mul: | 845 case IrOpcode::kInt64Mul: |
842 return MarkAsWord64(node), VisitInt64Mul(node); | 846 return MarkAsWord64(node), VisitInt64Mul(node); |
843 case IrOpcode::kInt64Div: | 847 case IrOpcode::kInt64Div: |
844 return MarkAsWord64(node), VisitInt64Div(node); | 848 return MarkAsWord64(node), VisitInt64Div(node); |
845 case IrOpcode::kInt64Mod: | 849 case IrOpcode::kInt64Mod: |
846 return MarkAsWord64(node), VisitInt64Mod(node); | 850 return MarkAsWord64(node), VisitInt64Mod(node); |
847 case IrOpcode::kInt64LessThan: | 851 case IrOpcode::kInt64LessThan: |
848 return VisitInt64LessThan(node); | 852 return VisitInt64LessThan(node); |
849 case IrOpcode::kInt64LessThanOrEqual: | 853 case IrOpcode::kInt64LessThanOrEqual: |
850 return VisitInt64LessThanOrEqual(node); | 854 return VisitInt64LessThanOrEqual(node); |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 | 1076 |
1073 void InstructionSelector::VisitWord64Popcnt(Node* node) { UNIMPLEMENTED(); } | 1077 void InstructionSelector::VisitWord64Popcnt(Node* node) { UNIMPLEMENTED(); } |
1074 | 1078 |
1075 | 1079 |
1076 void InstructionSelector::VisitWord64Equal(Node* node) { UNIMPLEMENTED(); } | 1080 void InstructionSelector::VisitWord64Equal(Node* node) { UNIMPLEMENTED(); } |
1077 | 1081 |
1078 | 1082 |
1079 void InstructionSelector::VisitInt64Add(Node* node) { UNIMPLEMENTED(); } | 1083 void InstructionSelector::VisitInt64Add(Node* node) { UNIMPLEMENTED(); } |
1080 | 1084 |
1081 | 1085 |
| 1086 void InstructionSelector::VisitInt64AddWithOverflow(Node* node) { |
| 1087 UNIMPLEMENTED(); |
| 1088 } |
| 1089 |
| 1090 |
1082 void InstructionSelector::VisitInt64Sub(Node* node) { UNIMPLEMENTED(); } | 1091 void InstructionSelector::VisitInt64Sub(Node* node) { UNIMPLEMENTED(); } |
1083 | 1092 |
1084 | 1093 |
| 1094 void InstructionSelector::VisitInt64SubWithOverflow(Node* node) { |
| 1095 UNIMPLEMENTED(); |
| 1096 } |
| 1097 |
| 1098 |
1085 void InstructionSelector::VisitInt64Mul(Node* node) { UNIMPLEMENTED(); } | 1099 void InstructionSelector::VisitInt64Mul(Node* node) { UNIMPLEMENTED(); } |
1086 | 1100 |
1087 | 1101 |
1088 void InstructionSelector::VisitInt64Div(Node* node) { UNIMPLEMENTED(); } | 1102 void InstructionSelector::VisitInt64Div(Node* node) { UNIMPLEMENTED(); } |
1089 | 1103 |
1090 | 1104 |
1091 void InstructionSelector::VisitInt64LessThan(Node* node) { UNIMPLEMENTED(); } | 1105 void InstructionSelector::VisitInt64LessThan(Node* node) { UNIMPLEMENTED(); } |
1092 | 1106 |
1093 | 1107 |
1094 void InstructionSelector::VisitInt64LessThanOrEqual(Node* node) { | 1108 void InstructionSelector::VisitInt64LessThanOrEqual(Node* node) { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 } | 1258 } |
1245 } | 1259 } |
1246 | 1260 |
1247 | 1261 |
1248 void InstructionSelector::VisitProjection(Node* node) { | 1262 void InstructionSelector::VisitProjection(Node* node) { |
1249 OperandGenerator g(this); | 1263 OperandGenerator g(this); |
1250 Node* value = node->InputAt(0); | 1264 Node* value = node->InputAt(0); |
1251 switch (value->opcode()) { | 1265 switch (value->opcode()) { |
1252 case IrOpcode::kInt32AddWithOverflow: | 1266 case IrOpcode::kInt32AddWithOverflow: |
1253 case IrOpcode::kInt32SubWithOverflow: | 1267 case IrOpcode::kInt32SubWithOverflow: |
| 1268 case IrOpcode::kInt64AddWithOverflow: |
| 1269 case IrOpcode::kInt64SubWithOverflow: |
1254 case IrOpcode::kTryTruncateFloat32ToInt64: | 1270 case IrOpcode::kTryTruncateFloat32ToInt64: |
1255 case IrOpcode::kTryTruncateFloat64ToInt64: | 1271 case IrOpcode::kTryTruncateFloat64ToInt64: |
1256 case IrOpcode::kTryTruncateFloat32ToUint64: | 1272 case IrOpcode::kTryTruncateFloat32ToUint64: |
1257 case IrOpcode::kTryTruncateFloat64ToUint64: | 1273 case IrOpcode::kTryTruncateFloat64ToUint64: |
1258 if (ProjectionIndexOf(node->op()) == 0u) { | 1274 if (ProjectionIndexOf(node->op()) == 0u) { |
1259 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1275 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
1260 } else { | 1276 } else { |
1261 DCHECK(ProjectionIndexOf(node->op()) == 1u); | 1277 DCHECK(ProjectionIndexOf(node->op()) == 1u); |
1262 MarkAsUsed(value); | 1278 MarkAsUsed(value); |
1263 } | 1279 } |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1512 return new (instruction_zone()) FrameStateDescriptor( | 1528 return new (instruction_zone()) FrameStateDescriptor( |
1513 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1529 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1514 state_info.state_combine(), parameters, locals, stack, | 1530 state_info.state_combine(), parameters, locals, stack, |
1515 state_info.shared_info(), outer_state); | 1531 state_info.shared_info(), outer_state); |
1516 } | 1532 } |
1517 | 1533 |
1518 | 1534 |
1519 } // namespace compiler | 1535 } // namespace compiler |
1520 } // namespace internal | 1536 } // namespace internal |
1521 } // namespace v8 | 1537 } // namespace v8 |
OLD | NEW |