Index: src/compiler/ia32/instruction-selector-ia32.cc |
diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc |
index 6834786f816e769bfa37d877f52db3542ee40212..5fb13f2b6e49f6d27b58f899e5a921aaa75b40c0 100644 |
--- a/src/compiler/ia32/instruction-selector-ia32.cc |
+++ b/src/compiler/ia32/instruction-selector-ia32.cc |
@@ -606,6 +606,48 @@ void InstructionSelector::VisitWord32PairShl(Node* node) { |
Emit(kIA32PairShl, 2, outputs, 3, inputs); |
} |
+void InstructionSelector::VisitWord32PairShr(Node* node) { |
+ IA32OperandGenerator g(this); |
+ |
+ Node* shift = node->InputAt(2); |
+ InstructionOperand shift_operand; |
+ if (g.CanBeImmediate(shift)) { |
+ shift_operand = g.UseImmediate(shift); |
+ } else { |
+ shift_operand = g.UseFixed(shift, ecx); |
+ } |
+ InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax), |
+ g.UseFixed(node->InputAt(1), edx), |
+ shift_operand}; |
+ |
+ InstructionOperand outputs[] = { |
+ g.DefineAsFixed(node, eax), |
+ g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)}; |
+ |
+ Emit(kIA32PairShr, 2, outputs, 3, inputs); |
+} |
+ |
+void InstructionSelector::VisitWord32PairSar(Node* node) { |
+ IA32OperandGenerator g(this); |
+ |
+ Node* shift = node->InputAt(2); |
+ InstructionOperand shift_operand; |
+ if (g.CanBeImmediate(shift)) { |
+ shift_operand = g.UseImmediate(shift); |
+ } else { |
+ shift_operand = g.UseFixed(shift, ecx); |
+ } |
+ InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax), |
+ g.UseFixed(node->InputAt(1), edx), |
+ shift_operand}; |
+ |
+ InstructionOperand outputs[] = { |
+ g.DefineAsFixed(node, eax), |
+ g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)}; |
+ |
+ Emit(kIA32PairSar, 2, outputs, 3, inputs); |
+} |
+ |
void InstructionSelector::VisitWord32Ror(Node* node) { |
VisitShift(this, node, kIA32Ror); |
} |