| Index: src/compiler/mips/instruction-selector-mips.cc
|
| diff --git a/src/compiler/mips/instruction-selector-mips.cc b/src/compiler/mips/instruction-selector-mips.cc
|
| index 0c180a14fba3ab6d72c9ccc198db87113a94d353..09daf8cf865bd7fe2ecd71df83727785903278ab 100644
|
| --- a/src/compiler/mips/instruction-selector-mips.cc
|
| +++ b/src/compiler/mips/instruction-selector-mips.cc
|
| @@ -395,17 +395,106 @@ void InstructionSelector::VisitWord32Sar(Node* node) {
|
| VisitRRO(this, kMipsSar, node);
|
| }
|
|
|
| -void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); }
|
| +void InstructionSelector::VisitInt32PairAdd(Node* node) {
|
| + MipsOperandGenerator g(this);
|
| +
|
| + // We use UseUniqueRegister here to avoid register sharing with the output
|
| + // register.
|
| + InstructionOperand inputs[] = {g.UseUniqueRegister(node->InputAt(0)),
|
| + g.UseUniqueRegister(node->InputAt(1)),
|
| + g.UseUniqueRegister(node->InputAt(2)),
|
| + g.UseUniqueRegister(node->InputAt(3))};
|
| + InstructionOperand outputs[] = {
|
| + g.DefineAsRegister(node),
|
| + g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
|
| + Emit(kMipsAddPair, 2, outputs, 4, inputs);
|
| +}
|
|
|
| -void InstructionSelector::VisitInt32PairSub(Node* node) { UNIMPLEMENTED(); }
|
| +void InstructionSelector::VisitInt32PairSub(Node* node) {
|
| + MipsOperandGenerator g(this);
|
| +
|
| + // We use UseUniqueRegister here to avoid register sharing with the output
|
| + // register.
|
| + InstructionOperand inputs[] = {g.UseUniqueRegister(node->InputAt(0)),
|
| + g.UseUniqueRegister(node->InputAt(1)),
|
| + g.UseUniqueRegister(node->InputAt(2)),
|
| + g.UseUniqueRegister(node->InputAt(3))};
|
| + InstructionOperand outputs[] = {
|
| + g.DefineAsRegister(node),
|
| + g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
|
| + Emit(kMipsSubPair, 2, outputs, 4, inputs);
|
| +}
|
|
|
| void InstructionSelector::VisitInt32PairMul(Node* node) { UNIMPLEMENTED(); }
|
|
|
| -void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); }
|
| +void InstructionSelector::VisitWord32PairShl(Node* node) {
|
| + MipsOperandGenerator g(this);
|
| + Int32Matcher m(node->InputAt(2));
|
| + InstructionOperand shift_operand;
|
| + if (m.HasValue()) {
|
| + shift_operand = g.UseImmediate(m.node());
|
| + } else {
|
| + shift_operand = g.UseUniqueRegister(m.node());
|
| + }
|
| +
|
| + // We use UseUniqueRegister here to avoid register sharing with the output
|
| + // register.
|
| + InstructionOperand inputs[] = {g.UseUniqueRegister(node->InputAt(0)),
|
| + g.UseUniqueRegister(node->InputAt(1)),
|
| + shift_operand};
|
|
|
| -void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); }
|
| + InstructionOperand outputs[] = {
|
| + g.DefineAsRegister(node),
|
| + g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
|
|
|
| -void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); }
|
| + Emit(kMipsShlPair, 2, outputs, 3, inputs);
|
| +}
|
| +
|
| +void InstructionSelector::VisitWord32PairShr(Node* node) {
|
| + MipsOperandGenerator g(this);
|
| + Int32Matcher m(node->InputAt(2));
|
| + InstructionOperand shift_operand;
|
| + if (m.HasValue()) {
|
| + shift_operand = g.UseImmediate(m.node());
|
| + } else {
|
| + shift_operand = g.UseUniqueRegister(m.node());
|
| + }
|
| +
|
| + // We use UseUniqueRegister here to avoid register sharing with the output
|
| + // register.
|
| + InstructionOperand inputs[] = {g.UseUniqueRegister(node->InputAt(0)),
|
| + g.UseUniqueRegister(node->InputAt(1)),
|
| + shift_operand};
|
| +
|
| + InstructionOperand outputs[] = {
|
| + g.DefineAsRegister(node),
|
| + g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
|
| +
|
| + Emit(kMipsShrPair, 2, outputs, 3, inputs);
|
| +}
|
| +
|
| +void InstructionSelector::VisitWord32PairSar(Node* node) {
|
| + MipsOperandGenerator g(this);
|
| + Int32Matcher m(node->InputAt(2));
|
| + InstructionOperand shift_operand;
|
| + if (m.HasValue()) {
|
| + shift_operand = g.UseImmediate(m.node());
|
| + } else {
|
| + shift_operand = g.UseUniqueRegister(m.node());
|
| + }
|
| +
|
| + // We use UseUniqueRegister here to avoid register sharing with the output
|
| + // register.
|
| + InstructionOperand inputs[] = {g.UseUniqueRegister(node->InputAt(0)),
|
| + g.UseUniqueRegister(node->InputAt(1)),
|
| + shift_operand};
|
| +
|
| + InstructionOperand outputs[] = {
|
| + g.DefineAsRegister(node),
|
| + g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
|
| +
|
| + Emit(kMipsSarPair, 2, outputs, 3, inputs);
|
| +}
|
|
|
| void InstructionSelector::VisitWord32Ror(Node* node) {
|
| VisitRRO(this, kMipsRor, node);
|
|
|