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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2258 X64OperandGenerator g(this); | 2258 X64OperandGenerator g(this); |
2259 Emit(kX64Int32x4Create, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 2259 Emit(kX64Int32x4Create, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
2260 } | 2260 } |
2261 | 2261 |
2262 void InstructionSelector::VisitInt32x4ExtractLane(Node* node) { | 2262 void InstructionSelector::VisitInt32x4ExtractLane(Node* node) { |
2263 X64OperandGenerator g(this); | 2263 X64OperandGenerator g(this); |
2264 Emit(kX64Int32x4ExtractLane, g.DefineAsRegister(node), | 2264 Emit(kX64Int32x4ExtractLane, g.DefineAsRegister(node), |
2265 g.UseRegister(node->InputAt(0)), g.UseImmediate(node->InputAt(1))); | 2265 g.UseRegister(node->InputAt(0)), g.UseImmediate(node->InputAt(1))); |
2266 } | 2266 } |
2267 | 2267 |
2268 void InstructionSelector::VisitInt32x4ReplaceLane(Node* node) { | |
2269 X64OperandGenerator g(this); | |
2270 Emit(kX64Int32x4ReplaceLane, g.DefineAsRegister(node), | |
2271 g.UseRegister(node->InputAt(0)), g.UseImmediate(node->InputAt(1)), | |
2272 g.Use(node->InputAt(2))); | |
2273 } | |
2274 | |
2275 void InstructionSelector::VisitInt32x4Add(Node* node) { | |
2276 X64OperandGenerator g(this); | |
2277 Emit(kX64Int32x4Add, g.DefineAsRegister(node), | |
2278 g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); | |
2279 } | |
2280 | |
2281 void InstructionSelector::VisitInt32x4Sub(Node* node) { | |
2282 X64OperandGenerator g(this); | |
2283 Emit(kX64Int32x4Sub, g.DefineAsRegister(node), | |
titzer
2016/10/07 12:20:14
As mentioned offline, these will have to be Define
gdeepti
2016/11/22 01:15:20
Done.
| |
2284 g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); | |
2285 } | |
2286 | |
2268 // static | 2287 // static |
2269 MachineOperatorBuilder::Flags | 2288 MachineOperatorBuilder::Flags |
2270 InstructionSelector::SupportedMachineOperatorFlags() { | 2289 InstructionSelector::SupportedMachineOperatorFlags() { |
2271 MachineOperatorBuilder::Flags flags = | 2290 MachineOperatorBuilder::Flags flags = |
2272 MachineOperatorBuilder::kWord32ShiftIsSafe | | 2291 MachineOperatorBuilder::kWord32ShiftIsSafe | |
2273 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; | 2292 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; |
2274 if (CpuFeatures::IsSupported(POPCNT)) { | 2293 if (CpuFeatures::IsSupported(POPCNT)) { |
2275 flags |= MachineOperatorBuilder::kWord32Popcnt | | 2294 flags |= MachineOperatorBuilder::kWord32Popcnt | |
2276 MachineOperatorBuilder::kWord64Popcnt; | 2295 MachineOperatorBuilder::kWord64Popcnt; |
2277 } | 2296 } |
(...skipping 13 matching lines...) Expand all Loading... | |
2291 // static | 2310 // static |
2292 MachineOperatorBuilder::AlignmentRequirements | 2311 MachineOperatorBuilder::AlignmentRequirements |
2293 InstructionSelector::AlignmentRequirements() { | 2312 InstructionSelector::AlignmentRequirements() { |
2294 return MachineOperatorBuilder::AlignmentRequirements:: | 2313 return MachineOperatorBuilder::AlignmentRequirements:: |
2295 FullUnalignedAccessSupport(); | 2314 FullUnalignedAccessSupport(); |
2296 } | 2315 } |
2297 | 2316 |
2298 } // namespace compiler | 2317 } // namespace compiler |
2299 } // namespace internal | 2318 } // namespace internal |
2300 } // namespace v8 | 2319 } // namespace v8 |
OLD | NEW |