| 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 6cb30b8cb70a3f5e7a24d9bb529cd65d9027df14..8d8e40d1e1e8efc5f78114835b9f0243301eef88 100644
|
| --- a/src/compiler/ia32/instruction-selector-ia32.cc
|
| +++ b/src/compiler/ia32/instruction-selector-ia32.cc
|
| @@ -638,8 +638,9 @@ void InstructionSelector::VisitInt32PairMul(Node* node) {
|
| Emit(kIA32MulPair, 2, outputs, 4, inputs, 1, temps);
|
| }
|
|
|
| -void InstructionSelector::VisitWord32PairShl(Node* node) {
|
| - IA32OperandGenerator g(this);
|
| +void VisitWord32PairShift(InstructionSelector* selector, InstructionCode opcode,
|
| + Node* node) {
|
| + IA32OperandGenerator g(selector);
|
|
|
| Node* shift = node->InputAt(2);
|
| InstructionOperand shift_operand;
|
| @@ -656,49 +657,19 @@ void InstructionSelector::VisitWord32PairShl(Node* node) {
|
| g.DefineAsFixed(node, eax),
|
| g.DefineAsFixed(NodeProperties::FindProjection(node, 1), edx)};
|
|
|
| - Emit(kIA32ShlPair, 2, outputs, 3, inputs);
|
| + selector->Emit(opcode, 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)};
|
| +void InstructionSelector::VisitWord32PairShl(Node* node) {
|
| + VisitWord32PairShift(this, kIA32ShlPair, node);
|
| +}
|
|
|
| - Emit(kIA32ShrPair, 2, outputs, 3, inputs);
|
| +void InstructionSelector::VisitWord32PairShr(Node* node) {
|
| + VisitWord32PairShift(this, kIA32ShrPair, node);
|
| }
|
|
|
| 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(kIA32SarPair, 2, outputs, 3, inputs);
|
| + VisitWord32PairShift(this, kIA32SarPair, node);
|
| }
|
|
|
| void InstructionSelector::VisitWord32Ror(Node* node) {
|
|
|