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

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

Issue 1807243002: S390: [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/s390/instruction-scheduler-s390.cc ('k') | src/s390/assembler-s390.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/s390/frames-s390.h" 9 #include "src/s390/frames-s390.h"
10 10
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 } else if (mleft.right().Is(24) && m.right().Is(24)) { 747 } else if (mleft.right().Is(24) && m.right().Is(24)) {
748 Emit(kS390_ExtendSignWord8, g.DefineAsRegister(node), 748 Emit(kS390_ExtendSignWord8, g.DefineAsRegister(node),
749 g.UseRegister(mleft.left().node())); 749 g.UseRegister(mleft.left().node()));
750 return; 750 return;
751 } 751 }
752 } 752 }
753 VisitRRO(this, kS390_ShiftRightArith32, node, kShift32Imm); 753 VisitRRO(this, kS390_ShiftRightArith32, node, kShift32Imm);
754 } 754 }
755 755
756 #if !V8_TARGET_ARCH_S390X 756 #if !V8_TARGET_ARCH_S390X
757 void InstructionSelector::VisitInt32PairAdd(Node* node) { 757 void VisitPairBinop(InstructionSelector* selector, ArchOpcode opcode,
758 S390OperandGenerator g(this); 758 Node* node) {
759 S390OperandGenerator g(selector);
759 760
760 // We use UseUniqueRegister here to avoid register sharing with the output 761 // We use UseUniqueRegister here to avoid register sharing with the output
761 // registers. 762 // registers.
762 InstructionOperand inputs[] = { 763 InstructionOperand inputs[] = {
763 g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), 764 g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)),
764 g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; 765 g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))};
765 766
766 InstructionOperand outputs[] = { 767 InstructionOperand outputs[] = {
767 g.DefineAsRegister(node), 768 g.DefineAsRegister(node),
768 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; 769 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
769 770
770 Emit(kS390_AddPair, 2, outputs, 4, inputs); 771 selector->Emit(opcode, 2, outputs, 4, inputs);
772 }
773
774 void InstructionSelector::VisitInt32PairAdd(Node* node) {
775 VisitPairBinop(this, kS390_AddPair, node);
776 }
777
778 void InstructionSelector::VisitInt32PairSub(Node* node) {
779 VisitPairBinop(this, kS390_SubPair, node);
771 } 780 }
772 781
773 void VisitPairShift(InstructionSelector* selector, ArchOpcode opcode, 782 void VisitPairShift(InstructionSelector* selector, ArchOpcode opcode,
774 Node* node) { 783 Node* node) {
775 S390OperandGenerator g(selector); 784 S390OperandGenerator g(selector);
776 Int32Matcher m(node->InputAt(2)); 785 Int32Matcher m(node->InputAt(2));
777 InstructionOperand shift_operand; 786 InstructionOperand shift_operand;
778 if (m.HasValue()) { 787 if (m.HasValue()) {
779 shift_operand = g.UseImmediate(m.node()); 788 shift_operand = g.UseImmediate(m.node());
780 } else { 789 } else {
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 MachineOperatorBuilder::kFloat32RoundTruncate | 1742 MachineOperatorBuilder::kFloat32RoundTruncate |
1734 MachineOperatorBuilder::kFloat64RoundTruncate | 1743 MachineOperatorBuilder::kFloat64RoundTruncate |
1735 MachineOperatorBuilder::kFloat64RoundTiesAway | 1744 MachineOperatorBuilder::kFloat64RoundTiesAway |
1736 MachineOperatorBuilder::kWord32Popcnt | 1745 MachineOperatorBuilder::kWord32Popcnt |
1737 MachineOperatorBuilder::kWord64Popcnt; 1746 MachineOperatorBuilder::kWord64Popcnt;
1738 } 1747 }
1739 1748
1740 } // namespace compiler 1749 } // namespace compiler
1741 } // namespace internal 1750 } // namespace internal
1742 } // namespace v8 1751 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/s390/instruction-scheduler-s390.cc ('k') | src/s390/assembler-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698