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

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
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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 g.UseFixed(node->InputAt(1), edx), 599 g.UseFixed(node->InputAt(1), edx),
600 shift_operand}; 600 shift_operand};
601 601
602 InstructionOperand outputs[] = { 602 InstructionOperand outputs[] = {
603 g.DefineAsFixed(node, eax), 603 g.DefineAsFixed(node, eax),
604 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)}; 604 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)};
605 605
606 Emit(kIA32PairShl, 2, outputs, 3, inputs); 606 Emit(kIA32PairShl, 2, outputs, 3, inputs);
607 } 607 }
608 608
609 void InstructionSelector::VisitWord32PairShr(Node* node) {
610 IA32OperandGenerator g(this);
611
612 Node* shift = node->InputAt(2);
613 InstructionOperand shift_operand;
614 if (g.CanBeImmediate(shift)) {
615 shift_operand = g.UseImmediate(shift);
616 } else {
617 shift_operand = g.UseFixed(shift, ecx);
618 }
619 InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax),
620 g.UseFixed(node->InputAt(1), edx),
621 shift_operand};
622
623 InstructionOperand outputs[] = {
624 g.DefineAsFixed(node, eax),
625 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)};
626
627 Emit(kIA32PairShr, 2, outputs, 3, inputs);
628 }
629
630 void InstructionSelector::VisitWord32PairSar(Node* node) {
631 IA32OperandGenerator g(this);
632
633 Node* shift = node->InputAt(2);
634 InstructionOperand shift_operand;
635 if (g.CanBeImmediate(shift)) {
636 shift_operand = g.UseImmediate(shift);
637 } else {
638 shift_operand = g.UseFixed(shift, ecx);
639 }
640 InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax),
641 g.UseFixed(node->InputAt(1), edx),
642 shift_operand};
643
644 InstructionOperand outputs[] = {
645 g.DefineAsFixed(node, eax),
646 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)};
647
648 Emit(kIA32PairSar, 2, outputs, 3, inputs);
649 }
650
609 void InstructionSelector::VisitWord32Ror(Node* node) { 651 void InstructionSelector::VisitWord32Ror(Node* node) {
610 VisitShift(this, node, kIA32Ror); 652 VisitShift(this, node, kIA32Ror);
611 } 653 }
612 654
613 655
614 void InstructionSelector::VisitWord32Clz(Node* node) { 656 void InstructionSelector::VisitWord32Clz(Node* node) {
615 IA32OperandGenerator g(this); 657 IA32OperandGenerator g(this);
616 Emit(kIA32Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 658 Emit(kIA32Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
617 } 659 }
618 660
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 MachineOperatorBuilder::kFloat64RoundTruncate | 1507 MachineOperatorBuilder::kFloat64RoundTruncate |
1466 MachineOperatorBuilder::kFloat32RoundTiesEven | 1508 MachineOperatorBuilder::kFloat32RoundTiesEven |
1467 MachineOperatorBuilder::kFloat64RoundTiesEven; 1509 MachineOperatorBuilder::kFloat64RoundTiesEven;
1468 } 1510 }
1469 return flags; 1511 return flags;
1470 } 1512 }
1471 1513
1472 } // namespace compiler 1514 } // namespace compiler
1473 } // namespace internal 1515 } // namespace internal
1474 } // namespace v8 1516 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698