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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 | 594 |
595 InstructionOperand outputs[] = { | 595 InstructionOperand outputs[] = { |
596 g.DefineSameAsFirst(node), | 596 g.DefineSameAsFirst(node), |
597 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; | 597 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
598 | 598 |
599 InstructionOperand temps[] = {g.TempRegister()}; | 599 InstructionOperand temps[] = {g.TempRegister()}; |
600 | 600 |
601 Emit(kIA32AddPair, 2, outputs, 4, inputs, 1, temps); | 601 Emit(kIA32AddPair, 2, outputs, 4, inputs, 1, temps); |
602 } | 602 } |
603 | 603 |
| 604 void InstructionSelector::VisitInt32PairSub(Node* node) { |
| 605 IA32OperandGenerator g(this); |
| 606 |
| 607 // We use UseUniqueRegister here to avoid register sharing with the temp |
| 608 // register. |
| 609 InstructionOperand inputs[] = { |
| 610 g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), |
| 611 g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; |
| 612 |
| 613 InstructionOperand outputs[] = { |
| 614 g.DefineSameAsFirst(node), |
| 615 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
| 616 |
| 617 InstructionOperand temps[] = {g.TempRegister()}; |
| 618 |
| 619 Emit(kIA32SubPair, 2, outputs, 4, inputs, 1, temps); |
| 620 } |
| 621 |
604 void InstructionSelector::VisitWord32PairShl(Node* node) { | 622 void InstructionSelector::VisitWord32PairShl(Node* node) { |
605 IA32OperandGenerator g(this); | 623 IA32OperandGenerator g(this); |
606 | 624 |
607 Node* shift = node->InputAt(2); | 625 Node* shift = node->InputAt(2); |
608 InstructionOperand shift_operand; | 626 InstructionOperand shift_operand; |
609 if (g.CanBeImmediate(shift)) { | 627 if (g.CanBeImmediate(shift)) { |
610 shift_operand = g.UseImmediate(shift); | 628 shift_operand = g.UseImmediate(shift); |
611 } else { | 629 } else { |
612 shift_operand = g.UseFixed(shift, ecx); | 630 shift_operand = g.UseFixed(shift, ecx); |
613 } | 631 } |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 MachineOperatorBuilder::kFloat64RoundTruncate | | 1541 MachineOperatorBuilder::kFloat64RoundTruncate | |
1524 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1542 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1525 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1543 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1526 } | 1544 } |
1527 return flags; | 1545 return flags; |
1528 } | 1546 } |
1529 | 1547 |
1530 } // namespace compiler | 1548 } // namespace compiler |
1531 } // namespace internal | 1549 } // namespace internal |
1532 } // namespace v8 | 1550 } // namespace v8 |
OLD | NEW |