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

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

Issue 2780713003: MIPS[64]: Support for some SIMD operations (3) (Closed)
Patch Set: rebased Created 3 years, 8 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
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/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 122
123 static void VisitRRR(InstructionSelector* selector, ArchOpcode opcode, 123 static void VisitRRR(InstructionSelector* selector, ArchOpcode opcode,
124 Node* node) { 124 Node* node) {
125 MipsOperandGenerator g(selector); 125 MipsOperandGenerator g(selector);
126 selector->Emit(opcode, g.DefineAsRegister(node), 126 selector->Emit(opcode, g.DefineAsRegister(node),
127 g.UseRegister(node->InputAt(0)), 127 g.UseRegister(node->InputAt(0)),
128 g.UseRegister(node->InputAt(1))); 128 g.UseRegister(node->InputAt(1)));
129 } 129 }
130 130
131 void VisitRRRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) {
132 MipsOperandGenerator g(selector);
133 selector->Emit(
134 opcode, g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0)),
135 g.UseRegister(node->InputAt(1)), g.UseRegister(node->InputAt(2)));
136 }
131 137
132 static void VisitRR(InstructionSelector* selector, ArchOpcode opcode, 138 static void VisitRR(InstructionSelector* selector, ArchOpcode opcode,
133 Node* node) { 139 Node* node) {
134 MipsOperandGenerator g(selector); 140 MipsOperandGenerator g(selector);
135 selector->Emit(opcode, g.DefineAsRegister(node), 141 selector->Emit(opcode, g.DefineAsRegister(node),
136 g.UseRegister(node->InputAt(0))); 142 g.UseRegister(node->InputAt(0)));
137 } 143 }
138 144
139 static void VisitRRI(InstructionSelector* selector, ArchOpcode opcode, 145 static void VisitRRI(InstructionSelector* selector, ArchOpcode opcode,
140 Node* node) { 146 Node* node) {
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 } 1974 }
1969 1975
1970 void InstructionSelector::VisitF32x4SConvertI32x4(Node* node) { 1976 void InstructionSelector::VisitF32x4SConvertI32x4(Node* node) {
1971 VisitRR(this, kMipsF32x4SConvertI32x4, node); 1977 VisitRR(this, kMipsF32x4SConvertI32x4, node);
1972 } 1978 }
1973 1979
1974 void InstructionSelector::VisitF32x4UConvertI32x4(Node* node) { 1980 void InstructionSelector::VisitF32x4UConvertI32x4(Node* node) {
1975 VisitRR(this, kMipsF32x4UConvertI32x4, node); 1981 VisitRR(this, kMipsF32x4UConvertI32x4, node);
1976 } 1982 }
1977 1983
1984 void InstructionSelector::VisitI32x4Mul(Node* node) {
1985 VisitRRR(this, kMipsI32x4Mul, node);
1986 }
1987
1988 void InstructionSelector::VisitI32x4MaxS(Node* node) {
1989 VisitRRR(this, kMipsI32x4MaxS, node);
1990 }
1991
1992 void InstructionSelector::VisitI32x4MinS(Node* node) {
1993 VisitRRR(this, kMipsI32x4MinS, node);
1994 }
1995
1996 void InstructionSelector::VisitI32x4Eq(Node* node) {
1997 VisitRRR(this, kMipsI32x4Eq, node);
1998 }
1999
2000 void InstructionSelector::VisitI32x4Ne(Node* node) {
2001 VisitRRR(this, kMipsI32x4Ne, node);
2002 }
2003
2004 void InstructionSelector::VisitI32x4Shl(Node* node) {
2005 VisitRRI(this, kMipsI32x4Shl, node);
2006 }
2007
2008 void InstructionSelector::VisitI32x4ShrS(Node* node) {
2009 VisitRRI(this, kMipsI32x4ShrS, node);
2010 }
2011
2012 void InstructionSelector::VisitI32x4ShrU(Node* node) {
2013 VisitRRI(this, kMipsI32x4ShrU, node);
2014 }
2015
2016 void InstructionSelector::VisitI32x4MaxU(Node* node) {
2017 VisitRRR(this, kMipsI32x4MaxU, node);
2018 }
2019
2020 void InstructionSelector::VisitI32x4MinU(Node* node) {
2021 VisitRRR(this, kMipsI32x4MinU, node);
2022 }
2023
2024 void InstructionSelector::VisitS32x4Select(Node* node) {
2025 VisitRRRR(this, kMipsS32x4Select, node);
2026 }
2027
1978 // static 2028 // static
1979 MachineOperatorBuilder::Flags 2029 MachineOperatorBuilder::Flags
1980 InstructionSelector::SupportedMachineOperatorFlags() { 2030 InstructionSelector::SupportedMachineOperatorFlags() {
1981 MachineOperatorBuilder::Flags flags = MachineOperatorBuilder::kNoFlags; 2031 MachineOperatorBuilder::Flags flags = MachineOperatorBuilder::kNoFlags;
1982 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && 2032 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
1983 IsFp64Mode()) { 2033 IsFp64Mode()) {
1984 flags |= MachineOperatorBuilder::kFloat64RoundDown | 2034 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1985 MachineOperatorBuilder::kFloat64RoundUp | 2035 MachineOperatorBuilder::kFloat64RoundUp |
1986 MachineOperatorBuilder::kFloat64RoundTruncate | 2036 MachineOperatorBuilder::kFloat64RoundTruncate |
1987 MachineOperatorBuilder::kFloat64RoundTiesEven; 2037 MachineOperatorBuilder::kFloat64RoundTiesEven;
(...skipping 22 matching lines...) Expand all
2010 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || 2060 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) ||
2011 IsMipsArchVariant(kMips32r2)); 2061 IsMipsArchVariant(kMips32r2));
2012 return MachineOperatorBuilder::AlignmentRequirements:: 2062 return MachineOperatorBuilder::AlignmentRequirements::
2013 NoUnalignedAccessSupport(); 2063 NoUnalignedAccessSupport();
2014 } 2064 }
2015 } 2065 }
2016 2066
2017 } // namespace compiler 2067 } // namespace compiler
2018 } // namespace internal 2068 } // namespace internal
2019 } // namespace v8 2069 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-codes-mips.h ('k') | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698