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-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { | 1230 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { |
1231 VisitRR(this, kArm64Float64ToInt32, node); | 1231 VisitRR(this, kArm64Float64ToInt32, node); |
1232 } | 1232 } |
1233 | 1233 |
1234 | 1234 |
1235 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { | 1235 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
1236 VisitRR(this, kArm64Float64ToUint32, node); | 1236 VisitRR(this, kArm64Float64ToUint32, node); |
1237 } | 1237 } |
1238 | 1238 |
1239 | 1239 |
1240 void InstructionSelector::VisitTruncateFloat32ToInt64(Node* node) { | 1240 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { |
1241 VisitRR(this, kArm64Float32ToInt64, node); | 1241 Arm64OperandGenerator g(this); |
| 1242 |
| 1243 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
| 1244 InstructionOperand outputs[2]; |
| 1245 size_t output_count = 0; |
| 1246 outputs[output_count++] = g.DefineAsRegister(node); |
| 1247 |
| 1248 Node* success_output = NodeProperties::FindProjection(node, 1); |
| 1249 if (success_output) { |
| 1250 outputs[output_count++] = g.DefineAsRegister(success_output); |
| 1251 } |
| 1252 |
| 1253 Emit(kArm64Float32ToInt64, output_count, outputs, 1, inputs); |
1242 } | 1254 } |
1243 | 1255 |
1244 | 1256 |
1245 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { | 1257 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { |
1246 Arm64OperandGenerator g(this); | 1258 Arm64OperandGenerator g(this); |
1247 | 1259 |
1248 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; | 1260 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
1249 InstructionOperand outputs[2]; | 1261 InstructionOperand outputs[2]; |
1250 size_t output_count = 0; | 1262 size_t output_count = 0; |
1251 outputs[output_count++] = g.DefineAsRegister(node); | 1263 outputs[output_count++] = g.DefineAsRegister(node); |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2122 MachineOperatorBuilder::kFloat32RoundTiesEven | | 2134 MachineOperatorBuilder::kFloat32RoundTiesEven | |
2123 MachineOperatorBuilder::kFloat64RoundTiesEven | | 2135 MachineOperatorBuilder::kFloat64RoundTiesEven | |
2124 MachineOperatorBuilder::kWord32ShiftIsSafe | | 2136 MachineOperatorBuilder::kWord32ShiftIsSafe | |
2125 MachineOperatorBuilder::kInt32DivIsSafe | | 2137 MachineOperatorBuilder::kInt32DivIsSafe | |
2126 MachineOperatorBuilder::kUint32DivIsSafe; | 2138 MachineOperatorBuilder::kUint32DivIsSafe; |
2127 } | 2139 } |
2128 | 2140 |
2129 } // namespace compiler | 2141 } // namespace compiler |
2130 } // namespace internal | 2142 } // namespace internal |
2131 } // namespace v8 | 2143 } // namespace v8 |
OLD | NEW |