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

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

Issue 1756863002: [wasm] Int64Lowering of I64Shl on ia32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Forgot to turn off the test for arm. Created 4 years, 9 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/compiler/instruction-selector.cc » ('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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 578
579 void InstructionSelector::VisitWord32Shr(Node* node) { 579 void InstructionSelector::VisitWord32Shr(Node* node) {
580 VisitShift(this, node, kIA32Shr); 580 VisitShift(this, node, kIA32Shr);
581 } 581 }
582 582
583 583
584 void InstructionSelector::VisitWord32Sar(Node* node) { 584 void InstructionSelector::VisitWord32Sar(Node* node) {
585 VisitShift(this, node, kIA32Sar); 585 VisitShift(this, node, kIA32Sar);
586 } 586 }
587 587
588 void InstructionSelector::VisitWord32PairShl(Node* node) {
589 IA32OperandGenerator g(this);
590
591 Node* shift = node->InputAt(2);
592 InstructionOperand shift_operand;
593 if (g.CanBeImmediate(shift)) {
594 shift_operand = g.UseImmediate(shift);
595 } else {
596 shift_operand = g.UseFixed(shift, ecx);
597 }
598 InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax),
599 g.UseFixed(node->InputAt(1), edx),
600 shift_operand};
601
602 InstructionOperand outputs[] = {
603 g.DefineAsFixed(node, eax),
604 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)};
605
606 Emit(kIA32PairShl, 2, outputs, 3, inputs);
607 }
588 608
589 void InstructionSelector::VisitWord32Ror(Node* node) { 609 void InstructionSelector::VisitWord32Ror(Node* node) {
590 VisitShift(this, node, kIA32Ror); 610 VisitShift(this, node, kIA32Ror);
591 } 611 }
592 612
593 613
594 void InstructionSelector::VisitWord32Clz(Node* node) { 614 void InstructionSelector::VisitWord32Clz(Node* node) {
595 IA32OperandGenerator g(this); 615 IA32OperandGenerator g(this);
596 Emit(kIA32Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 616 Emit(kIA32Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
597 } 617 }
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 MachineOperatorBuilder::kFloat64RoundTruncate | 1464 MachineOperatorBuilder::kFloat64RoundTruncate |
1445 MachineOperatorBuilder::kFloat32RoundTiesEven | 1465 MachineOperatorBuilder::kFloat32RoundTiesEven |
1446 MachineOperatorBuilder::kFloat64RoundTiesEven; 1466 MachineOperatorBuilder::kFloat64RoundTiesEven;
1447 } 1467 }
1448 return flags; 1468 return flags;
1449 } 1469 }
1450 1470
1451 } // namespace compiler 1471 } // namespace compiler
1452 } // namespace internal 1472 } // namespace internal
1453 } // namespace v8 1473 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-scheduler-ia32.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698