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 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 case IrOpcode::kFloat64Max: | 1133 case IrOpcode::kFloat64Max: |
1134 return MarkAsFloat64(node), VisitFloat64Max(node); | 1134 return MarkAsFloat64(node), VisitFloat64Max(node); |
1135 case IrOpcode::kFloat64Abs: | 1135 case IrOpcode::kFloat64Abs: |
1136 return MarkAsFloat64(node), VisitFloat64Abs(node); | 1136 return MarkAsFloat64(node), VisitFloat64Abs(node); |
1137 case IrOpcode::kFloat64Atan: | 1137 case IrOpcode::kFloat64Atan: |
1138 return MarkAsFloat64(node), VisitFloat64Atan(node); | 1138 return MarkAsFloat64(node), VisitFloat64Atan(node); |
1139 case IrOpcode::kFloat64Atan2: | 1139 case IrOpcode::kFloat64Atan2: |
1140 return MarkAsFloat64(node), VisitFloat64Atan2(node); | 1140 return MarkAsFloat64(node), VisitFloat64Atan2(node); |
1141 case IrOpcode::kFloat64Atanh: | 1141 case IrOpcode::kFloat64Atanh: |
1142 return MarkAsFloat64(node), VisitFloat64Atanh(node); | 1142 return MarkAsFloat64(node), VisitFloat64Atanh(node); |
| 1143 case IrOpcode::kFloat64Cbrt: |
| 1144 return MarkAsFloat64(node), VisitFloat64Cbrt(node); |
| 1145 case IrOpcode::kFloat64Cos: |
| 1146 return MarkAsFloat64(node), VisitFloat64Cos(node); |
1143 case IrOpcode::kFloat64Exp: | 1147 case IrOpcode::kFloat64Exp: |
1144 return MarkAsFloat64(node), VisitFloat64Exp(node); | 1148 return MarkAsFloat64(node), VisitFloat64Exp(node); |
1145 case IrOpcode::kFloat64Expm1: | 1149 case IrOpcode::kFloat64Expm1: |
1146 return MarkAsFloat64(node), VisitFloat64Expm1(node); | 1150 return MarkAsFloat64(node), VisitFloat64Expm1(node); |
1147 case IrOpcode::kFloat64Log: | 1151 case IrOpcode::kFloat64Log: |
1148 return MarkAsFloat64(node), VisitFloat64Log(node); | 1152 return MarkAsFloat64(node), VisitFloat64Log(node); |
1149 case IrOpcode::kFloat64Log1p: | 1153 case IrOpcode::kFloat64Log1p: |
1150 return MarkAsFloat64(node), VisitFloat64Log1p(node); | 1154 return MarkAsFloat64(node), VisitFloat64Log1p(node); |
| 1155 case IrOpcode::kFloat64Log10: |
| 1156 return MarkAsFloat64(node), VisitFloat64Log10(node); |
1151 case IrOpcode::kFloat64Log2: | 1157 case IrOpcode::kFloat64Log2: |
1152 return MarkAsFloat64(node), VisitFloat64Log2(node); | 1158 return MarkAsFloat64(node), VisitFloat64Log2(node); |
1153 case IrOpcode::kFloat64Log10: | 1159 case IrOpcode::kFloat64Sin: |
1154 return MarkAsFloat64(node), VisitFloat64Log10(node); | 1160 return MarkAsFloat64(node), VisitFloat64Sin(node); |
1155 case IrOpcode::kFloat64Cbrt: | |
1156 return MarkAsFloat64(node), VisitFloat64Cbrt(node); | |
1157 case IrOpcode::kFloat64Sqrt: | 1161 case IrOpcode::kFloat64Sqrt: |
1158 return MarkAsFloat64(node), VisitFloat64Sqrt(node); | 1162 return MarkAsFloat64(node), VisitFloat64Sqrt(node); |
1159 case IrOpcode::kFloat64Equal: | 1163 case IrOpcode::kFloat64Equal: |
1160 return VisitFloat64Equal(node); | 1164 return VisitFloat64Equal(node); |
1161 case IrOpcode::kFloat64LessThan: | 1165 case IrOpcode::kFloat64LessThan: |
1162 return VisitFloat64LessThan(node); | 1166 return VisitFloat64LessThan(node); |
1163 case IrOpcode::kFloat64LessThanOrEqual: | 1167 case IrOpcode::kFloat64LessThanOrEqual: |
1164 return VisitFloat64LessThanOrEqual(node); | 1168 return VisitFloat64LessThanOrEqual(node); |
1165 case IrOpcode::kFloat32RoundDown: | 1169 case IrOpcode::kFloat32RoundDown: |
1166 return MarkAsFloat32(node), VisitFloat32RoundDown(node); | 1170 return MarkAsFloat32(node), VisitFloat32RoundDown(node); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 } | 1268 } |
1265 | 1269 |
1266 void InstructionSelector::VisitFloat64Atan2(Node* node) { | 1270 void InstructionSelector::VisitFloat64Atan2(Node* node) { |
1267 VisitFloat64Ieee754Binop(node, kIeee754Float64Atan2); | 1271 VisitFloat64Ieee754Binop(node, kIeee754Float64Atan2); |
1268 } | 1272 } |
1269 | 1273 |
1270 void InstructionSelector::VisitFloat64Atanh(Node* node) { | 1274 void InstructionSelector::VisitFloat64Atanh(Node* node) { |
1271 VisitFloat64Ieee754Unop(node, kIeee754Float64Atanh); | 1275 VisitFloat64Ieee754Unop(node, kIeee754Float64Atanh); |
1272 } | 1276 } |
1273 | 1277 |
| 1278 void InstructionSelector::VisitFloat64Cbrt(Node* node) { |
| 1279 VisitFloat64Ieee754Unop(node, kIeee754Float64Cbrt); |
| 1280 } |
| 1281 |
| 1282 void InstructionSelector::VisitFloat64Cos(Node* node) { |
| 1283 VisitFloat64Ieee754Unop(node, kIeee754Float64Cos); |
| 1284 } |
| 1285 |
1274 void InstructionSelector::VisitFloat64Exp(Node* node) { | 1286 void InstructionSelector::VisitFloat64Exp(Node* node) { |
1275 VisitFloat64Ieee754Unop(node, kIeee754Float64Exp); | 1287 VisitFloat64Ieee754Unop(node, kIeee754Float64Exp); |
1276 } | 1288 } |
1277 | 1289 |
1278 void InstructionSelector::VisitFloat64Expm1(Node* node) { | 1290 void InstructionSelector::VisitFloat64Expm1(Node* node) { |
1279 VisitFloat64Ieee754Unop(node, kIeee754Float64Expm1); | 1291 VisitFloat64Ieee754Unop(node, kIeee754Float64Expm1); |
1280 } | 1292 } |
1281 | 1293 |
1282 void InstructionSelector::VisitFloat64Log(Node* node) { | 1294 void InstructionSelector::VisitFloat64Log(Node* node) { |
1283 VisitFloat64Ieee754Unop(node, kIeee754Float64Log); | 1295 VisitFloat64Ieee754Unop(node, kIeee754Float64Log); |
1284 } | 1296 } |
1285 | 1297 |
1286 void InstructionSelector::VisitFloat64Log1p(Node* node) { | 1298 void InstructionSelector::VisitFloat64Log1p(Node* node) { |
1287 VisitFloat64Ieee754Unop(node, kIeee754Float64Log1p); | 1299 VisitFloat64Ieee754Unop(node, kIeee754Float64Log1p); |
1288 } | 1300 } |
1289 | 1301 |
1290 void InstructionSelector::VisitFloat64Log2(Node* node) { | 1302 void InstructionSelector::VisitFloat64Log2(Node* node) { |
1291 VisitFloat64Ieee754Unop(node, kIeee754Float64Log2); | 1303 VisitFloat64Ieee754Unop(node, kIeee754Float64Log2); |
1292 } | 1304 } |
1293 | 1305 |
1294 void InstructionSelector::VisitFloat64Log10(Node* node) { | 1306 void InstructionSelector::VisitFloat64Log10(Node* node) { |
1295 VisitFloat64Ieee754Unop(node, kIeee754Float64Log10); | 1307 VisitFloat64Ieee754Unop(node, kIeee754Float64Log10); |
1296 } | 1308 } |
1297 | 1309 |
1298 void InstructionSelector::VisitFloat64Cbrt(Node* node) { | 1310 void InstructionSelector::VisitFloat64Sin(Node* node) { |
1299 VisitFloat64Ieee754Unop(node, kIeee754Float64Cbrt); | 1311 VisitFloat64Ieee754Unop(node, kIeee754Float64Sin); |
1300 } | 1312 } |
1301 | 1313 |
1302 void InstructionSelector::EmitTableSwitch(const SwitchInfo& sw, | 1314 void InstructionSelector::EmitTableSwitch(const SwitchInfo& sw, |
1303 InstructionOperand& index_operand) { | 1315 InstructionOperand& index_operand) { |
1304 OperandGenerator g(this); | 1316 OperandGenerator g(this); |
1305 size_t input_count = 2 + sw.value_range; | 1317 size_t input_count = 2 + sw.value_range; |
1306 auto* inputs = zone()->NewArray<InstructionOperand>(input_count); | 1318 auto* inputs = zone()->NewArray<InstructionOperand>(input_count); |
1307 inputs[0] = index_operand; | 1319 inputs[0] = index_operand; |
1308 InstructionOperand default_operand = g.Label(sw.default_branch); | 1320 InstructionOperand default_operand = g.Label(sw.default_branch); |
1309 std::fill(&inputs[1], &inputs[input_count], default_operand); | 1321 std::fill(&inputs[1], &inputs[input_count], default_operand); |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 return new (instruction_zone()) FrameStateDescriptor( | 1925 return new (instruction_zone()) FrameStateDescriptor( |
1914 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1926 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1915 state_info.state_combine(), parameters, locals, stack, | 1927 state_info.state_combine(), parameters, locals, stack, |
1916 state_info.shared_info(), outer_state); | 1928 state_info.shared_info(), outer_state); |
1917 } | 1929 } |
1918 | 1930 |
1919 | 1931 |
1920 } // namespace compiler | 1932 } // namespace compiler |
1921 } // namespace internal | 1933 } // namespace internal |
1922 } // namespace v8 | 1934 } // namespace v8 |
OLD | NEW |