Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: src/compiler/ia32/instruction-selector-ia32.cc

Issue 2916093002: [ia32][wasm] Support AVX instructions for I32x4Splat/ReplaceLane/ExtractLane (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/ia32/instruction-scheduler-ia32.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-scheduler-ia32.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698