Index: src/compiler/x87/instruction-selector-x87.cc |
diff --git a/src/compiler/x87/instruction-selector-x87.cc b/src/compiler/x87/instruction-selector-x87.cc |
index a93906db550e28ccece487ce4621153c17148235..e9d7c093db5c48c79e796d860b2e7d1d3b7c7ff0 100644 |
--- a/src/compiler/x87/instruction-selector-x87.cc |
+++ b/src/compiler/x87/instruction-selector-x87.cc |
@@ -562,12 +562,50 @@ void InstructionSelector::VisitWord32PairShl(Node* node) { |
g.DefineAsFixed(node, eax), |
g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)}; |
- Emit(kX87PairShl, 2, outputs, 3, inputs); |
+ Emit(kX87ShlPair, 2, outputs, 3, inputs); |
} |
-void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); } |
+void InstructionSelector::VisitWord32PairShr(Node* node) { |
+ X87OperandGenerator 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(kX87ShrPair, 2, outputs, 3, inputs); |
+} |
-void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } |
+void InstructionSelector::VisitWord32PairSar(Node* node) { |
+ X87OperandGenerator 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(kX87SarPair, 2, outputs, 3, inputs); |
+} |
void InstructionSelector::VisitWord32Ror(Node* node) { |
VisitShift(this, node, kX87Ror); |