OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 555 |
556 InstructionOperand outputs[] = { | 556 InstructionOperand outputs[] = { |
557 g.DefineSameAsFirst(node), | 557 g.DefineSameAsFirst(node), |
558 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; | 558 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
559 | 559 |
560 InstructionOperand temps[] = {g.TempRegister()}; | 560 InstructionOperand temps[] = {g.TempRegister()}; |
561 | 561 |
562 Emit(kX87AddPair, 2, outputs, 4, inputs, 1, temps); | 562 Emit(kX87AddPair, 2, outputs, 4, inputs, 1, temps); |
563 } | 563 } |
564 | 564 |
565 void InstructionSelector::VisitInt32PairSub(Node* node) { UNIMPLEMENTED(); } | 565 void InstructionSelector::VisitInt32PairSub(Node* node) { |
| 566 X87OperandGenerator g(this); |
| 567 |
| 568 // We use UseUniqueRegister here to avoid register sharing with the temp |
| 569 // register. |
| 570 InstructionOperand inputs[] = { |
| 571 g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), |
| 572 g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; |
| 573 |
| 574 InstructionOperand outputs[] = { |
| 575 g.DefineSameAsFirst(node), |
| 576 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
| 577 |
| 578 InstructionOperand temps[] = {g.TempRegister()}; |
| 579 |
| 580 Emit(kX87SubPair, 2, outputs, 4, inputs, 1, temps); |
| 581 } |
566 | 582 |
567 void InstructionSelector::VisitWord32PairShl(Node* node) { | 583 void InstructionSelector::VisitWord32PairShl(Node* node) { |
568 X87OperandGenerator g(this); | 584 X87OperandGenerator g(this); |
569 | 585 |
570 Node* shift = node->InputAt(2); | 586 Node* shift = node->InputAt(2); |
571 InstructionOperand shift_operand; | 587 InstructionOperand shift_operand; |
572 if (g.CanBeImmediate(shift)) { | 588 if (g.CanBeImmediate(shift)) { |
573 shift_operand = g.UseImmediate(shift); | 589 shift_operand = g.UseImmediate(shift); |
574 } else { | 590 } else { |
575 shift_operand = g.UseFixed(shift, ecx); | 591 shift_operand = g.UseFixed(shift, ecx); |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1547 MachineOperatorBuilder::kFloat32RoundTruncate | | 1563 MachineOperatorBuilder::kFloat32RoundTruncate | |
1548 MachineOperatorBuilder::kFloat64RoundTruncate | | 1564 MachineOperatorBuilder::kFloat64RoundTruncate | |
1549 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1565 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1550 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1566 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1551 return flags; | 1567 return flags; |
1552 } | 1568 } |
1553 | 1569 |
1554 } // namespace compiler | 1570 } // namespace compiler |
1555 } // namespace internal | 1571 } // namespace internal |
1556 } // namespace v8 | 1572 } // namespace v8 |
OLD | NEW |