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

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

Issue 1768233002: [wasm] Int64Lowering of I64ShrU and I64ShrS on ia32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 shift_operand = g.UseFixed(shift, ecx); 594 shift_operand = g.UseFixed(shift, ecx);
595 } 595 }
596 InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax), 596 InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax),
597 g.UseFixed(node->InputAt(1), edx), 597 g.UseFixed(node->InputAt(1), edx),
598 shift_operand}; 598 shift_operand};
599 599
600 InstructionOperand outputs[] = { 600 InstructionOperand outputs[] = {
601 g.DefineAsFixed(node, eax), 601 g.DefineAsFixed(node, eax),
602 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)}; 602 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)};
603 603
604 Emit(kIA32PairShl, 2, outputs, 3, inputs); 604 Emit(kIA32ShlPair, 2, outputs, 3, inputs);
605 }
606
607 void InstructionSelector::VisitWord32PairShr(Node* node) {
608 IA32OperandGenerator g(this);
609
610 Node* shift = node->InputAt(2);
611 InstructionOperand shift_operand;
612 if (g.CanBeImmediate(shift)) {
613 shift_operand = g.UseImmediate(shift);
614 } else {
615 shift_operand = g.UseFixed(shift, ecx);
616 }
617 InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax),
618 g.UseFixed(node->InputAt(1), edx),
619 shift_operand};
620
621 InstructionOperand outputs[] = {
622 g.DefineAsFixed(node, eax),
623 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)};
624
625 Emit(kIA32ShrPair, 2, outputs, 3, inputs);
626 }
627
628 void InstructionSelector::VisitWord32PairSar(Node* node) {
629 IA32OperandGenerator g(this);
630
631 Node* shift = node->InputAt(2);
632 InstructionOperand shift_operand;
633 if (g.CanBeImmediate(shift)) {
634 shift_operand = g.UseImmediate(shift);
635 } else {
636 shift_operand = g.UseFixed(shift, ecx);
637 }
638 InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax),
639 g.UseFixed(node->InputAt(1), edx),
640 shift_operand};
641
642 InstructionOperand outputs[] = {
643 g.DefineAsFixed(node, eax),
644 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)};
645
646 Emit(kIA32SarPair, 2, outputs, 3, inputs);
605 } 647 }
606 648
607 void InstructionSelector::VisitWord32Ror(Node* node) { 649 void InstructionSelector::VisitWord32Ror(Node* node) {
608 VisitShift(this, node, kIA32Ror); 650 VisitShift(this, node, kIA32Ror);
609 } 651 }
610 652
611 653
612 void InstructionSelector::VisitWord32Clz(Node* node) { 654 void InstructionSelector::VisitWord32Clz(Node* node) {
613 IA32OperandGenerator g(this); 655 IA32OperandGenerator g(this);
614 Emit(kIA32Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 656 Emit(kIA32Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 MachineOperatorBuilder::kFloat64RoundTruncate | 1505 MachineOperatorBuilder::kFloat64RoundTruncate |
1464 MachineOperatorBuilder::kFloat32RoundTiesEven | 1506 MachineOperatorBuilder::kFloat32RoundTiesEven |
1465 MachineOperatorBuilder::kFloat64RoundTiesEven; 1507 MachineOperatorBuilder::kFloat64RoundTiesEven;
1466 } 1508 }
1467 return flags; 1509 return flags;
1468 } 1510 }
1469 1511
1470 } // namespace compiler 1512 } // namespace compiler
1471 } // namespace internal 1513 } // namespace internal
1472 } // namespace v8 1514 } // 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