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

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

Issue 728103007: [x64] Recognize MOVSXBL. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/x64/assembler-x64.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/compiler/generic-node-inl.h" 5 #include "src/compiler/generic-node-inl.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 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 347
348 void InstructionSelector::VisitWord32Sar(Node* node) { 348 void InstructionSelector::VisitWord32Sar(Node* node) {
349 X64OperandGenerator g(this); 349 X64OperandGenerator g(this);
350 Int32BinopMatcher m(node); 350 Int32BinopMatcher m(node);
351 if (CanCover(m.node(), m.left().node()) && m.left().IsWord32Shl()) { 351 if (CanCover(m.node(), m.left().node()) && m.left().IsWord32Shl()) {
352 Int32BinopMatcher mleft(m.left().node()); 352 Int32BinopMatcher mleft(m.left().node());
353 if (mleft.right().Is(16) && m.right().Is(16)) { 353 if (mleft.right().Is(16) && m.right().Is(16)) {
354 Emit(kX64Movsxwl, g.DefineAsRegister(node), g.Use(mleft.left().node())); 354 Emit(kX64Movsxwl, g.DefineAsRegister(node), g.Use(mleft.left().node()));
355 return; 355 return;
356 } else if (mleft.right().Is(24) && m.right().Is(24)) {
357 Emit(kX64Movsxbl, g.DefineAsRegister(node), g.Use(mleft.left().node()));
358 return;
356 } 359 }
357 } 360 }
358 VisitWord32Shift(this, node, kX64Sar32); 361 VisitWord32Shift(this, node, kX64Sar32);
359 } 362 }
360 363
361 364
362 void InstructionSelector::VisitWord64Sar(Node* node) { 365 void InstructionSelector::VisitWord64Sar(Node* node) {
363 VisitWord64Shift(this, node, kX64Sar); 366 VisitWord64Shift(this, node, kX64Sar);
364 } 367 }
365 368
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 return MachineOperatorBuilder::kFloat64Floor | 1171 return MachineOperatorBuilder::kFloat64Floor |
1169 MachineOperatorBuilder::kFloat64Ceil | 1172 MachineOperatorBuilder::kFloat64Ceil |
1170 MachineOperatorBuilder::kFloat64RoundTruncate; 1173 MachineOperatorBuilder::kFloat64RoundTruncate;
1171 } 1174 }
1172 return MachineOperatorBuilder::kNoFlags; 1175 return MachineOperatorBuilder::kNoFlags;
1173 } 1176 }
1174 1177
1175 } // namespace compiler 1178 } // namespace compiler
1176 } // namespace internal 1179 } // namespace internal
1177 } // namespace v8 1180 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698