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

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

Issue 1459723002: MIPS: [turbofan] Add matching rule to use Nor instruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed typo. Created 5 years, 1 month 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 VisitBinop(this, node, kMipsAnd); 287 VisitBinop(this, node, kMipsAnd);
288 } 288 }
289 289
290 290
291 void InstructionSelector::VisitWord32Or(Node* node) { 291 void InstructionSelector::VisitWord32Or(Node* node) {
292 VisitBinop(this, node, kMipsOr); 292 VisitBinop(this, node, kMipsOr);
293 } 293 }
294 294
295 295
296 void InstructionSelector::VisitWord32Xor(Node* node) { 296 void InstructionSelector::VisitWord32Xor(Node* node) {
297 Int32BinopMatcher m(node);
298 if (m.left().IsWord32Or() && CanCover(node, m.left().node()) &&
299 m.right().Is(-1)) {
300 Int32BinopMatcher mleft(m.left().node());
301 if (!mleft.right().HasValue()) {
302 MipsOperandGenerator g(this);
303 Emit(kMipsNor, g.DefineAsRegister(node),
304 g.UseRegister(mleft.left().node()),
305 g.UseRegister(mleft.right().node()));
306 return;
307 }
308 }
297 VisitBinop(this, node, kMipsXor); 309 VisitBinop(this, node, kMipsXor);
298 } 310 }
299 311
300 312
301 void InstructionSelector::VisitWord32Shl(Node* node) { 313 void InstructionSelector::VisitWord32Shl(Node* node) {
302 VisitRRO(this, kMipsShl, node); 314 VisitRRO(this, kMipsShl, node);
303 } 315 }
304 316
305 317
306 void InstructionSelector::VisitWord32Shr(Node* node) { 318 void InstructionSelector::VisitWord32Shr(Node* node) {
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 } 1178 }
1167 return flags | MachineOperatorBuilder::kFloat64Min | 1179 return flags | MachineOperatorBuilder::kFloat64Min |
1168 MachineOperatorBuilder::kFloat64Max | 1180 MachineOperatorBuilder::kFloat64Max |
1169 MachineOperatorBuilder::kFloat32Min | 1181 MachineOperatorBuilder::kFloat32Min |
1170 MachineOperatorBuilder::kFloat32Max; 1182 MachineOperatorBuilder::kFloat32Max;
1171 } 1183 }
1172 1184
1173 } // namespace compiler 1185 } // namespace compiler
1174 } // namespace internal 1186 } // namespace internal
1175 } // namespace v8 1187 } // 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