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

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

Issue 1807273002: [wasm] Int64Lowering of Int64Mul on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-phi
Patch Set: Rebase Created 4 years, 8 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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 613
614 InstructionOperand outputs[] = { 614 InstructionOperand outputs[] = {
615 g.DefineSameAsFirst(node), 615 g.DefineSameAsFirst(node),
616 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; 616 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
617 617
618 InstructionOperand temps[] = {g.TempRegister()}; 618 InstructionOperand temps[] = {g.TempRegister()};
619 619
620 Emit(kIA32SubPair, 2, outputs, 4, inputs, 1, temps); 620 Emit(kIA32SubPair, 2, outputs, 4, inputs, 1, temps);
621 } 621 }
622 622
623 void InstructionSelector::VisitInt32PairMul(Node* node) {
624 IA32OperandGenerator g(this);
625
626 // InputAt(3) explicitly shares ecx with OutputRegister(1) to save one
627 // register and one mov instruction.
628 InstructionOperand inputs[] = {
629 g.UseUnique(node->InputAt(0)), g.UseUnique(node->InputAt(1)),
630 g.UseUniqueRegister(node->InputAt(2)), g.UseFixed(node->InputAt(3), ecx)};
631
632 InstructionOperand outputs[] = {
633 g.DefineAsFixed(node, eax),
634 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), ecx)};
635
636 InstructionOperand temps[] = {g.TempRegister(edx)};
637
638 Emit(kIA32MulPair, 2, outputs, 4, inputs, 1, temps);
639 }
640
623 void InstructionSelector::VisitWord32PairShl(Node* node) { 641 void InstructionSelector::VisitWord32PairShl(Node* node) {
624 IA32OperandGenerator g(this); 642 IA32OperandGenerator g(this);
625 643
626 Node* shift = node->InputAt(2); 644 Node* shift = node->InputAt(2);
627 InstructionOperand shift_operand; 645 InstructionOperand shift_operand;
628 if (g.CanBeImmediate(shift)) { 646 if (g.CanBeImmediate(shift)) {
629 shift_operand = g.UseImmediate(shift); 647 shift_operand = g.UseImmediate(shift);
630 } else { 648 } else {
631 shift_operand = g.UseFixed(shift, ecx); 649 shift_operand = g.UseFixed(shift, ecx);
632 } 650 }
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 MachineOperatorBuilder::kFloat64RoundTruncate | 1560 MachineOperatorBuilder::kFloat64RoundTruncate |
1543 MachineOperatorBuilder::kFloat32RoundTiesEven | 1561 MachineOperatorBuilder::kFloat32RoundTiesEven |
1544 MachineOperatorBuilder::kFloat64RoundTiesEven; 1562 MachineOperatorBuilder::kFloat64RoundTiesEven;
1545 } 1563 }
1546 return flags; 1564 return flags;
1547 } 1565 }
1548 1566
1549 } // namespace compiler 1567 } // namespace compiler
1550 } // namespace internal 1568 } // namespace internal
1551 } // namespace v8 1569 } // 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