Index: src/compiler/s390/instruction-selector-s390.cc |
diff --git a/src/compiler/s390/instruction-selector-s390.cc b/src/compiler/s390/instruction-selector-s390.cc |
index ac2c07e16216a18a8d57e89c4e076a0baf5ded30..095b7f9da91a3ba6b8c5ff9db2259c9965e540b6 100644 |
--- a/src/compiler/s390/instruction-selector-s390.cc |
+++ b/src/compiler/s390/instruction-selector-s390.cc |
@@ -750,12 +750,48 @@ void InstructionSelector::VisitWord32Sar(Node* node) { |
return; |
} |
} |
- VisitRRO(this, kS390_ShiftRightAlg32, node, kShift32Imm); |
+ VisitRRO(this, kS390_ShiftRightArith32, node, kShift32Imm); |
} |
+#if !V8_TARGET_ARCH_S390X |
+void VisitPairShift(InstructionSelector* selector, ArchOpcode opcode, |
+ Node* node) { |
+ S390OperandGenerator g(selector); |
+ Int32Matcher m(node->InputAt(2)); |
+ InstructionOperand shift_operand; |
+ if (m.HasValue()) { |
+ shift_operand = g.UseImmediate(m.node()); |
+ } else { |
+ shift_operand = g.UseUniqueRegister(m.node()); |
+ } |
+ |
+ InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0)), |
+ g.UseRegister(node->InputAt(1)), |
+ shift_operand}; |
+ |
+ InstructionOperand outputs[] = { |
+ g.DefineSameAsFirst(node), |
+ g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
+ |
+ selector->Emit(opcode, 2, outputs, 3, inputs); |
+} |
+ |
+void InstructionSelector::VisitWord32PairShl(Node* node) { |
+ VisitPairShift(this, kS390_ShiftLeftPair, node); |
+} |
+ |
+void InstructionSelector::VisitWord32PairShr(Node* node) { |
+ VisitPairShift(this, kS390_ShiftRightPair, node); |
+} |
+ |
+void InstructionSelector::VisitWord32PairSar(Node* node) { |
+ VisitPairShift(this, kS390_ShiftRightArithPair, node); |
+} |
+#endif |
+ |
#if V8_TARGET_ARCH_S390X |
void InstructionSelector::VisitWord64Sar(Node* node) { |
- VisitRRO(this, kS390_ShiftRightAlg64, node, kShift64Imm); |
+ VisitRRO(this, kS390_ShiftRightArith64, node, kShift64Imm); |
} |
#endif |
@@ -819,6 +855,10 @@ void InstructionSelector::VisitInt64Add(Node* node) { |
} |
#endif |
+#if !V8_TARGET_ARCH_S390X |
+void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); } |
+#endif |
+ |
void InstructionSelector::VisitInt32Sub(Node* node) { |
S390OperandGenerator g(this); |
Int32BinopMatcher m(node); |
@@ -1627,6 +1667,8 @@ void InstructionSelector::EmitPrepareArguments( |
bool InstructionSelector::IsTailCallAddressImmediate() { return false; } |
+int InstructionSelector::GetTempsCountForTailCallFromJSFunction() { return 3; } |
+ |
void InstructionSelector::VisitFloat64ExtractLowWord32(Node* node) { |
S390OperandGenerator g(this); |
Emit(kS390_DoubleExtractLowWord32, g.DefineAsRegister(node), |