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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 | 576 |
577 void InstructionSelector::VisitWord32Shr(Node* node) { | 577 void InstructionSelector::VisitWord32Shr(Node* node) { |
578 VisitShift(this, node, kIA32Shr); | 578 VisitShift(this, node, kIA32Shr); |
579 } | 579 } |
580 | 580 |
581 | 581 |
582 void InstructionSelector::VisitWord32Sar(Node* node) { | 582 void InstructionSelector::VisitWord32Sar(Node* node) { |
583 VisitShift(this, node, kIA32Sar); | 583 VisitShift(this, node, kIA32Sar); |
584 } | 584 } |
585 | 585 |
| 586 void InstructionSelector::VisitInt32PairAdd(Node* node) { |
| 587 IA32OperandGenerator g(this); |
| 588 |
| 589 // We use UseUniqueRegister here to avoid register sharing with the temp |
| 590 // register. |
| 591 InstructionOperand inputs[] = { |
| 592 g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), |
| 593 g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; |
| 594 |
| 595 InstructionOperand outputs[] = { |
| 596 g.DefineSameAsFirst(node), |
| 597 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
| 598 |
| 599 InstructionOperand temps[] = {g.TempRegister()}; |
| 600 |
| 601 Emit(kIA32AddPair, 2, outputs, 4, inputs, 1, temps); |
| 602 } |
| 603 |
586 void InstructionSelector::VisitWord32PairShl(Node* node) { | 604 void InstructionSelector::VisitWord32PairShl(Node* node) { |
587 IA32OperandGenerator g(this); | 605 IA32OperandGenerator g(this); |
588 | 606 |
589 Node* shift = node->InputAt(2); | 607 Node* shift = node->InputAt(2); |
590 InstructionOperand shift_operand; | 608 InstructionOperand shift_operand; |
591 if (g.CanBeImmediate(shift)) { | 609 if (g.CanBeImmediate(shift)) { |
592 shift_operand = g.UseImmediate(shift); | 610 shift_operand = g.UseImmediate(shift); |
593 } else { | 611 } else { |
594 shift_operand = g.UseFixed(shift, ecx); | 612 shift_operand = g.UseFixed(shift, ecx); |
595 } | 613 } |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1505 MachineOperatorBuilder::kFloat64RoundTruncate | | 1523 MachineOperatorBuilder::kFloat64RoundTruncate | |
1506 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1524 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1507 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1525 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1508 } | 1526 } |
1509 return flags; | 1527 return flags; |
1510 } | 1528 } |
1511 | 1529 |
1512 } // namespace compiler | 1530 } // namespace compiler |
1513 } // namespace internal | 1531 } // namespace internal |
1514 } // namespace v8 | 1532 } // namespace v8 |
OLD | NEW |