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

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

Issue 1807013002: S390: [wasm] Int64Lowering of Int64Add (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) {
758 S390OperandGenerator g(this);
759
760 // We use UseUniqueRegister here to avoid register sharing with the output
761 // registers.
762 InstructionOperand inputs[] = {
763 g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)),
764 g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))};
765
766 InstructionOperand outputs[] = {
767 g.DefineAsRegister(node),
768 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
769
770 Emit(kS390_AddPair, 2, outputs, 4, inputs);
771 }
772
757 void VisitPairShift(InstructionSelector* selector, ArchOpcode opcode, 773 void VisitPairShift(InstructionSelector* selector, ArchOpcode opcode,
758 Node* node) { 774 Node* node) {
759 S390OperandGenerator g(selector); 775 S390OperandGenerator g(selector);
760 Int32Matcher m(node->InputAt(2)); 776 Int32Matcher m(node->InputAt(2));
761 InstructionOperand shift_operand; 777 InstructionOperand shift_operand;
762 if (m.HasValue()) { 778 if (m.HasValue()) {
763 shift_operand = g.UseImmediate(m.node()); 779 shift_operand = g.UseImmediate(m.node());
764 } else { 780 } else {
765 shift_operand = g.UseUniqueRegister(m.node()); 781 shift_operand = g.UseUniqueRegister(m.node());
766 } 782 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 void InstructionSelector::VisitInt32Add(Node* node) { 864 void InstructionSelector::VisitInt32Add(Node* node) {
849 VisitBinop<Int32BinopMatcher>(this, node, kS390_Add, kInt16Imm); 865 VisitBinop<Int32BinopMatcher>(this, node, kS390_Add, kInt16Imm);
850 } 866 }
851 867
852 #if V8_TARGET_ARCH_S390X 868 #if V8_TARGET_ARCH_S390X
853 void InstructionSelector::VisitInt64Add(Node* node) { 869 void InstructionSelector::VisitInt64Add(Node* node) {
854 VisitBinop<Int64BinopMatcher>(this, node, kS390_Add, kInt16Imm); 870 VisitBinop<Int64BinopMatcher>(this, node, kS390_Add, kInt16Imm);
855 } 871 }
856 #endif 872 #endif
857 873
858 #if !V8_TARGET_ARCH_S390X
859 void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); }
860 #endif
861
862 void InstructionSelector::VisitInt32Sub(Node* node) { 874 void InstructionSelector::VisitInt32Sub(Node* node) {
863 S390OperandGenerator g(this); 875 S390OperandGenerator g(this);
864 Int32BinopMatcher m(node); 876 Int32BinopMatcher m(node);
865 if (m.left().Is(0)) { 877 if (m.left().Is(0)) {
866 Emit(kS390_Neg, g.DefineAsRegister(node), g.UseRegister(m.right().node())); 878 Emit(kS390_Neg, g.DefineAsRegister(node), g.UseRegister(m.right().node()));
867 } else { 879 } else {
868 VisitBinop<Int32BinopMatcher>(this, node, kS390_Sub, kInt16Imm_Negate); 880 VisitBinop<Int32BinopMatcher>(this, node, kS390_Sub, kInt16Imm_Negate);
869 } 881 }
870 } 882 }
871 883
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 MachineOperatorBuilder::kFloat32RoundTruncate | 1733 MachineOperatorBuilder::kFloat32RoundTruncate |
1722 MachineOperatorBuilder::kFloat64RoundTruncate | 1734 MachineOperatorBuilder::kFloat64RoundTruncate |
1723 MachineOperatorBuilder::kFloat64RoundTiesAway | 1735 MachineOperatorBuilder::kFloat64RoundTiesAway |
1724 MachineOperatorBuilder::kWord32Popcnt | 1736 MachineOperatorBuilder::kWord32Popcnt |
1725 MachineOperatorBuilder::kWord64Popcnt; 1737 MachineOperatorBuilder::kWord64Popcnt;
1726 } 1738 }
1727 1739
1728 } // namespace compiler 1740 } // namespace compiler
1729 } // namespace internal 1741 } // namespace internal
1730 } // namespace v8 1742 } // 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