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

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

Issue 1847563003: PPC: [wasm] Int64Lowering of Int64Mul. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/ppc/instruction-scheduler-ppc.cc ('k') | no next file » | 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 #include "src/ppc/frames-ppc.h" 9 #include "src/ppc/frames-ppc.h"
10 10
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 } 803 }
804 804
805 void InstructionSelector::VisitInt32PairAdd(Node* node) { 805 void InstructionSelector::VisitInt32PairAdd(Node* node) {
806 VisitPairBinop(this, kPPC_AddPair, node); 806 VisitPairBinop(this, kPPC_AddPair, node);
807 } 807 }
808 808
809 void InstructionSelector::VisitInt32PairSub(Node* node) { 809 void InstructionSelector::VisitInt32PairSub(Node* node) {
810 VisitPairBinop(this, kPPC_SubPair, node); 810 VisitPairBinop(this, kPPC_SubPair, node);
811 } 811 }
812 812
813 void InstructionSelector::VisitInt32PairMul(Node* node) { UNIMPLEMENTED(); } 813 void InstructionSelector::VisitInt32PairMul(Node* node) {
814 PPCOperandGenerator g(this);
815 InstructionOperand inputs[] = {g.UseUniqueRegister(node->InputAt(0)),
816 g.UseUniqueRegister(node->InputAt(1)),
817 g.UseUniqueRegister(node->InputAt(2)),
818 g.UseRegister(node->InputAt(3))};
819
820 InstructionOperand outputs[] = {
821 g.DefineAsRegister(node),
822 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
823
824 InstructionOperand temps[] = {g.TempRegister(), g.TempRegister()};
825
826 Emit(kPPC_MulPair, 2, outputs, 4, inputs, 2, temps);
827 }
814 828
815 void VisitPairShift(InstructionSelector* selector, InstructionCode opcode, 829 void VisitPairShift(InstructionSelector* selector, InstructionCode opcode,
816 Node* node) { 830 Node* node) {
817 PPCOperandGenerator g(selector); 831 PPCOperandGenerator g(selector);
818 Int32Matcher m(node->InputAt(2)); 832 Int32Matcher m(node->InputAt(2));
819 InstructionOperand shift_operand; 833 InstructionOperand shift_operand;
820 if (m.HasValue()) { 834 if (m.HasValue()) {
821 shift_operand = g.UseImmediate(m.node()); 835 shift_operand = g.UseImmediate(m.node());
822 } else { 836 } else {
823 shift_operand = g.UseUniqueRegister(m.node()); 837 shift_operand = g.UseUniqueRegister(m.node());
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 MachineOperatorBuilder::kFloat64RoundTruncate | 1906 MachineOperatorBuilder::kFloat64RoundTruncate |
1893 MachineOperatorBuilder::kFloat64RoundTiesAway | 1907 MachineOperatorBuilder::kFloat64RoundTiesAway |
1894 MachineOperatorBuilder::kWord32Popcnt | 1908 MachineOperatorBuilder::kWord32Popcnt |
1895 MachineOperatorBuilder::kWord64Popcnt; 1909 MachineOperatorBuilder::kWord64Popcnt;
1896 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. 1910 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f.
1897 } 1911 }
1898 1912
1899 } // namespace compiler 1913 } // namespace compiler
1900 } // namespace internal 1914 } // namespace internal
1901 } // namespace v8 1915 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ppc/instruction-scheduler-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698