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

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

Issue 1812473002: PPC: [wasm] Int64Lowering of Int64Sub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/ppc/instruction-scheduler-ppc.cc ('k') | src/ppc/assembler-ppc.h » ('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 #include "src/ppc/frames-ppc.h" 9 #include "src/ppc/frames-ppc.h"
10 10
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 } else if (mleft.right().Is(24) && m.right().Is(24)) { 778 } else if (mleft.right().Is(24) && m.right().Is(24)) {
779 Emit(kPPC_ExtendSignWord8, g.DefineAsRegister(node), 779 Emit(kPPC_ExtendSignWord8, g.DefineAsRegister(node),
780 g.UseRegister(mleft.left().node())); 780 g.UseRegister(mleft.left().node()));
781 return; 781 return;
782 } 782 }
783 } 783 }
784 VisitRRO(this, kPPC_ShiftRightAlg32, node, kShift32Imm); 784 VisitRRO(this, kPPC_ShiftRightAlg32, node, kShift32Imm);
785 } 785 }
786 786
787 #if !V8_TARGET_ARCH_PPC64 787 #if !V8_TARGET_ARCH_PPC64
788 void InstructionSelector::VisitInt32PairAdd(Node* node) { 788 void VisitPairBinop(InstructionSelector* selector, ArchOpcode opcode,
789 PPCOperandGenerator g(this); 789 Node* node) {
790 PPCOperandGenerator g(selector);
790 791
791 // We use UseUniqueRegister here to avoid register sharing with the output 792 // We use UseUniqueRegister here to avoid register sharing with the output
792 // registers. 793 // registers.
793 InstructionOperand inputs[] = { 794 InstructionOperand inputs[] = {
794 g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), 795 g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)),
795 g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; 796 g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))};
796 797
797 InstructionOperand outputs[] = { 798 InstructionOperand outputs[] = {
798 g.DefineAsRegister(node), 799 g.DefineAsRegister(node),
799 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; 800 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
800 801
801 Emit(kPPC_AddPair, 2, outputs, 4, inputs); 802 selector->Emit(opcode, 2, outputs, 4, inputs);
802 } 803 }
803 804
804 void InstructionSelector::VisitInt32PairSub(Node* node) { UNIMPLEMENTED(); } 805 void InstructionSelector::VisitInt32PairAdd(Node* node) {
806 VisitPairBinop(this, kPPC_AddPair, node);
807 }
808
809 void InstructionSelector::VisitInt32PairSub(Node* node) {
810 VisitPairBinop(this, kPPC_SubPair, node);
811 }
805 812
806 void VisitPairShift(InstructionSelector* selector, ArchOpcode opcode, 813 void VisitPairShift(InstructionSelector* selector, ArchOpcode opcode,
807 Node* node) { 814 Node* node) {
808 PPCOperandGenerator g(selector); 815 PPCOperandGenerator g(selector);
809 Int32Matcher m(node->InputAt(2)); 816 Int32Matcher m(node->InputAt(2));
810 InstructionOperand shift_operand; 817 InstructionOperand shift_operand;
811 if (m.HasValue()) { 818 if (m.HasValue()) {
812 shift_operand = g.UseImmediate(m.node()); 819 shift_operand = g.UseImmediate(m.node());
813 } else { 820 } else {
814 shift_operand = g.UseUniqueRegister(m.node()); 821 shift_operand = g.UseUniqueRegister(m.node());
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1883 MachineOperatorBuilder::kFloat64RoundTruncate | 1890 MachineOperatorBuilder::kFloat64RoundTruncate |
1884 MachineOperatorBuilder::kFloat64RoundTiesAway | 1891 MachineOperatorBuilder::kFloat64RoundTiesAway |
1885 MachineOperatorBuilder::kWord32Popcnt | 1892 MachineOperatorBuilder::kWord32Popcnt |
1886 MachineOperatorBuilder::kWord64Popcnt; 1893 MachineOperatorBuilder::kWord64Popcnt;
1887 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. 1894 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f.
1888 } 1895 }
1889 1896
1890 } // namespace compiler 1897 } // namespace compiler
1891 } // namespace internal 1898 } // namespace internal
1892 } // namespace v8 1899 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ppc/instruction-scheduler-ppc.cc ('k') | src/ppc/assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698