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/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 | 1911 |
1912 void InstructionSelector::VisitI32x4ExtractLane(Node* node) { | 1912 void InstructionSelector::VisitI32x4ExtractLane(Node* node) { |
1913 IA32OperandGenerator g(this); | 1913 IA32OperandGenerator g(this); |
1914 int32_t lane = OpParameter<int32_t>(node); | 1914 int32_t lane = OpParameter<int32_t>(node); |
1915 Emit(kIA32I32x4ExtractLane, g.DefineAsRegister(node), | 1915 Emit(kIA32I32x4ExtractLane, g.DefineAsRegister(node), |
1916 g.UseRegister(node->InputAt(0)), g.UseImmediate(lane)); | 1916 g.UseRegister(node->InputAt(0)), g.UseImmediate(lane)); |
1917 } | 1917 } |
1918 | 1918 |
1919 void InstructionSelector::VisitI32x4ReplaceLane(Node* node) { | 1919 void InstructionSelector::VisitI32x4ReplaceLane(Node* node) { |
1920 IA32OperandGenerator g(this); | 1920 IA32OperandGenerator g(this); |
1921 int32_t lane = OpParameter<int32_t>(node); | 1921 InstructionOperand operand0 = g.UseRegister(node->InputAt(0)); |
1922 Emit(kIA32I32x4ReplaceLane, g.DefineSameAsFirst(node), | 1922 InstructionOperand operand1 = g.UseImmediate(OpParameter<int32_t>(node)); |
1923 g.UseRegister(node->InputAt(0)), g.UseImmediate(lane), | 1923 InstructionOperand operand2 = g.Use(node->InputAt(1)); |
1924 g.Use(node->InputAt(1))); | 1924 if (IsSupported(AVX)) { |
| 1925 Emit(kAVXI32x4ReplaceLane, g.DefineAsRegister(node), operand0, operand1, |
| 1926 operand2); |
| 1927 } else { |
| 1928 Emit(kSSEI32x4ReplaceLane, g.DefineSameAsFirst(node), operand0, operand1, |
| 1929 operand2); |
| 1930 } |
1925 } | 1931 } |
1926 | 1932 |
1927 void InstructionSelector::VisitInt32AbsWithOverflow(Node* node) { | 1933 void InstructionSelector::VisitInt32AbsWithOverflow(Node* node) { |
1928 UNREACHABLE(); | 1934 UNREACHABLE(); |
1929 } | 1935 } |
1930 | 1936 |
1931 void InstructionSelector::VisitInt64AbsWithOverflow(Node* node) { | 1937 void InstructionSelector::VisitInt64AbsWithOverflow(Node* node) { |
1932 UNREACHABLE(); | 1938 UNREACHABLE(); |
1933 } | 1939 } |
1934 | 1940 |
(...skipping 22 matching lines...) Expand all Loading... |
1957 // static | 1963 // static |
1958 MachineOperatorBuilder::AlignmentRequirements | 1964 MachineOperatorBuilder::AlignmentRequirements |
1959 InstructionSelector::AlignmentRequirements() { | 1965 InstructionSelector::AlignmentRequirements() { |
1960 return MachineOperatorBuilder::AlignmentRequirements:: | 1966 return MachineOperatorBuilder::AlignmentRequirements:: |
1961 FullUnalignedAccessSupport(); | 1967 FullUnalignedAccessSupport(); |
1962 } | 1968 } |
1963 | 1969 |
1964 } // namespace compiler | 1970 } // namespace compiler |
1965 } // namespace internal | 1971 } // namespace internal |
1966 } // namespace v8 | 1972 } // namespace v8 |
OLD | NEW |