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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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::VisitTruncateFloat32ToInt64(Node* node) { |
1241 VisitRR(this, kArm64Float32ToInt64, node); | 1241 VisitRR(this, kArm64Float32ToInt64, node); |
1242 } | 1242 } |
1243 | 1243 |
1244 | 1244 |
1245 void InstructionSelector::VisitTruncateFloat64ToInt64(Node* node) { | 1245 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { |
1246 VisitRR(this, kArm64Float64ToInt64, node); | 1246 Arm64OperandGenerator g(this); |
1247 | |
1248 Constant int64min(INT64_MIN); | |
Rodolph Perfetta (ARM)
2015/12/07 11:19:47
those are not needed anymore
ahaas
2015/12/07 11:54:50
Done, thanks for looking at the code so carefully.
| |
1249 Constant int64max(INT64_MAX); | |
1250 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0)), | |
1251 sequence()->AddImmediate(int64min), | |
1252 sequence()->AddImmediate(int64max)}; | |
1253 InstructionOperand outputs[2]; | |
1254 size_t output_count = 0; | |
1255 size_t input_count = 1; | |
1256 outputs[output_count++] = g.DefineAsRegister(node); | |
1257 | |
1258 Node* success_output = NodeProperties::FindProjection(node, 1); | |
1259 if (success_output) { | |
1260 outputs[output_count++] = g.DefineAsRegister(success_output); | |
1261 input_count = 3; | |
1262 } | |
1263 | |
1264 Emit(kArm64Float64ToInt64, output_count, outputs, input_count, inputs); | |
1247 } | 1265 } |
1248 | 1266 |
1249 | 1267 |
1250 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { | 1268 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { |
1251 VisitRR(this, kArm64Float32ToUint64, node); | 1269 VisitRR(this, kArm64Float32ToUint64, node); |
1252 } | 1270 } |
1253 | 1271 |
1254 | 1272 |
1255 void InstructionSelector::VisitTruncateFloat64ToUint64(Node* node) { | 1273 void InstructionSelector::VisitTruncateFloat64ToUint64(Node* node) { |
1256 VisitRR(this, kArm64Float64ToUint64, node); | 1274 VisitRR(this, kArm64Float64ToUint64, node); |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2110 MachineOperatorBuilder::kFloat32RoundTiesEven | | 2128 MachineOperatorBuilder::kFloat32RoundTiesEven | |
2111 MachineOperatorBuilder::kFloat64RoundTiesEven | | 2129 MachineOperatorBuilder::kFloat64RoundTiesEven | |
2112 MachineOperatorBuilder::kWord32ShiftIsSafe | | 2130 MachineOperatorBuilder::kWord32ShiftIsSafe | |
2113 MachineOperatorBuilder::kInt32DivIsSafe | | 2131 MachineOperatorBuilder::kInt32DivIsSafe | |
2114 MachineOperatorBuilder::kUint32DivIsSafe; | 2132 MachineOperatorBuilder::kUint32DivIsSafe; |
2115 } | 2133 } |
2116 | 2134 |
2117 } // namespace compiler | 2135 } // namespace compiler |
2118 } // namespace internal | 2136 } // namespace internal |
2119 } // namespace v8 | 2137 } // namespace v8 |
OLD | NEW |