| 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 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 case IrOpcode::kFloat64Mod: | 1122 case IrOpcode::kFloat64Mod: |
| 1123 return MarkAsFloat64(node), VisitFloat64Mod(node); | 1123 return MarkAsFloat64(node), VisitFloat64Mod(node); |
| 1124 case IrOpcode::kFloat64Min: | 1124 case IrOpcode::kFloat64Min: |
| 1125 return MarkAsFloat64(node), VisitFloat64Min(node); | 1125 return MarkAsFloat64(node), VisitFloat64Min(node); |
| 1126 case IrOpcode::kFloat64Max: | 1126 case IrOpcode::kFloat64Max: |
| 1127 return MarkAsFloat64(node), VisitFloat64Max(node); | 1127 return MarkAsFloat64(node), VisitFloat64Max(node); |
| 1128 case IrOpcode::kFloat64Abs: | 1128 case IrOpcode::kFloat64Abs: |
| 1129 return MarkAsFloat64(node), VisitFloat64Abs(node); | 1129 return MarkAsFloat64(node), VisitFloat64Abs(node); |
| 1130 case IrOpcode::kFloat64Log: | 1130 case IrOpcode::kFloat64Log: |
| 1131 return MarkAsFloat64(node), VisitFloat64Log(node); | 1131 return MarkAsFloat64(node), VisitFloat64Log(node); |
| 1132 case IrOpcode::kFloat64Log1p: |
| 1133 return MarkAsFloat64(node), VisitFloat64Log1p(node); |
| 1132 case IrOpcode::kFloat64Sqrt: | 1134 case IrOpcode::kFloat64Sqrt: |
| 1133 return MarkAsFloat64(node), VisitFloat64Sqrt(node); | 1135 return MarkAsFloat64(node), VisitFloat64Sqrt(node); |
| 1134 case IrOpcode::kFloat64Equal: | 1136 case IrOpcode::kFloat64Equal: |
| 1135 return VisitFloat64Equal(node); | 1137 return VisitFloat64Equal(node); |
| 1136 case IrOpcode::kFloat64LessThan: | 1138 case IrOpcode::kFloat64LessThan: |
| 1137 return VisitFloat64LessThan(node); | 1139 return VisitFloat64LessThan(node); |
| 1138 case IrOpcode::kFloat64LessThanOrEqual: | 1140 case IrOpcode::kFloat64LessThanOrEqual: |
| 1139 return VisitFloat64LessThanOrEqual(node); | 1141 return VisitFloat64LessThanOrEqual(node); |
| 1140 case IrOpcode::kFloat32RoundDown: | 1142 case IrOpcode::kFloat32RoundDown: |
| 1141 return MarkAsFloat32(node), VisitFloat32RoundDown(node); | 1143 return MarkAsFloat32(node), VisitFloat32RoundDown(node); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 void InstructionSelector::VisitLoadFramePointer(Node* node) { | 1229 void InstructionSelector::VisitLoadFramePointer(Node* node) { |
| 1228 OperandGenerator g(this); | 1230 OperandGenerator g(this); |
| 1229 Emit(kArchFramePointer, g.DefineAsRegister(node)); | 1231 Emit(kArchFramePointer, g.DefineAsRegister(node)); |
| 1230 } | 1232 } |
| 1231 | 1233 |
| 1232 void InstructionSelector::VisitLoadParentFramePointer(Node* node) { | 1234 void InstructionSelector::VisitLoadParentFramePointer(Node* node) { |
| 1233 OperandGenerator g(this); | 1235 OperandGenerator g(this); |
| 1234 Emit(kArchParentFramePointer, g.DefineAsRegister(node)); | 1236 Emit(kArchParentFramePointer, g.DefineAsRegister(node)); |
| 1235 } | 1237 } |
| 1236 | 1238 |
| 1239 void InstructionSelector::VisitFloat64Log(Node* node) { |
| 1240 VisitFloat64Ieee754Unop(node, kIeee754Float64Log); |
| 1241 } |
| 1242 |
| 1243 void InstructionSelector::VisitFloat64Log1p(Node* node) { |
| 1244 VisitFloat64Ieee754Unop(node, kIeee754Float64Log1p); |
| 1245 } |
| 1246 |
| 1237 void InstructionSelector::EmitTableSwitch(const SwitchInfo& sw, | 1247 void InstructionSelector::EmitTableSwitch(const SwitchInfo& sw, |
| 1238 InstructionOperand& index_operand) { | 1248 InstructionOperand& index_operand) { |
| 1239 OperandGenerator g(this); | 1249 OperandGenerator g(this); |
| 1240 size_t input_count = 2 + sw.value_range; | 1250 size_t input_count = 2 + sw.value_range; |
| 1241 auto* inputs = zone()->NewArray<InstructionOperand>(input_count); | 1251 auto* inputs = zone()->NewArray<InstructionOperand>(input_count); |
| 1242 inputs[0] = index_operand; | 1252 inputs[0] = index_operand; |
| 1243 InstructionOperand default_operand = g.Label(sw.default_branch); | 1253 InstructionOperand default_operand = g.Label(sw.default_branch); |
| 1244 std::fill(&inputs[1], &inputs[input_count], default_operand); | 1254 std::fill(&inputs[1], &inputs[input_count], default_operand); |
| 1245 for (size_t index = 0; index < sw.case_count; ++index) { | 1255 for (size_t index = 0; index < sw.case_count; ++index) { |
| 1246 size_t value = sw.case_values[index] - sw.min_value; | 1256 size_t value = sw.case_values[index] - sw.min_value; |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1839 return new (instruction_zone()) FrameStateDescriptor( | 1849 return new (instruction_zone()) FrameStateDescriptor( |
| 1840 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1850 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 1841 state_info.state_combine(), parameters, locals, stack, | 1851 state_info.state_combine(), parameters, locals, stack, |
| 1842 state_info.shared_info(), outer_state); | 1852 state_info.shared_info(), outer_state); |
| 1843 } | 1853 } |
| 1844 | 1854 |
| 1845 | 1855 |
| 1846 } // namespace compiler | 1856 } // namespace compiler |
| 1847 } // namespace internal | 1857 } // namespace internal |
| 1848 } // namespace v8 | 1858 } // namespace v8 |
| OLD | NEW |