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 #include "src/ppc/frames-ppc.h" | 9 #include "src/ppc/frames-ppc.h" |
10 | 10 |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1604 VisitFloat64Compare(this, node, &cont); | 1604 VisitFloat64Compare(this, node, &cont); |
1605 } | 1605 } |
1606 | 1606 |
1607 | 1607 |
1608 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { | 1608 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { |
1609 FlagsContinuation cont(kUnsignedLessThanOrEqual, node); | 1609 FlagsContinuation cont(kUnsignedLessThanOrEqual, node); |
1610 VisitFloat64Compare(this, node, &cont); | 1610 VisitFloat64Compare(this, node, &cont); |
1611 } | 1611 } |
1612 | 1612 |
1613 | 1613 |
1614 void InstructionSelector::EmitPrepareArguments(NodeVector* arguments, | 1614 void InstructionSelector::EmitPrepareArguments( |
1615 const CallDescriptor* descriptor, | 1615 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, |
1616 Node* node) { | 1616 Node* node) { |
1617 PPCOperandGenerator g(this); | 1617 PPCOperandGenerator g(this); |
1618 | 1618 |
1619 // Prepare for C function call. | 1619 // Prepare for C function call. |
1620 if (descriptor->IsCFunctionCall()) { | 1620 if (descriptor->IsCFunctionCall()) { |
1621 Emit(kArchPrepareCallCFunction | | 1621 Emit(kArchPrepareCallCFunction | |
1622 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), | 1622 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), |
1623 0, nullptr, 0, nullptr); | 1623 0, nullptr, 0, nullptr); |
1624 | 1624 |
1625 // Poke any stack arguments. | 1625 // Poke any stack arguments. |
1626 int slot = kStackFrameExtraParamSlot; | 1626 int slot = kStackFrameExtraParamSlot; |
1627 for (Node* node : (*arguments)) { | 1627 for (PushParameter input : (*arguments)) { |
1628 Emit(kPPC_StoreToStackSlot, g.NoOutput(), g.UseRegister(node), | 1628 Emit(kPPC_StoreToStackSlot, g.NoOutput(), g.UseRegister(input.node()), |
1629 g.TempImmediate(slot)); | 1629 g.TempImmediate(slot)); |
1630 ++slot; | 1630 ++slot; |
1631 } | 1631 } |
1632 } else { | 1632 } else { |
1633 // Push any stack arguments. | 1633 // Push any stack arguments. |
1634 int num_slots = static_cast<int>(descriptor->StackParameterCount()); | 1634 int num_slots = static_cast<int>(descriptor->StackParameterCount()); |
1635 int slot = 0; | 1635 int slot = 0; |
1636 for (Node* input : (*arguments)) { | 1636 for (PushParameter input : (*arguments)) { |
1637 if (slot == 0) { | 1637 if (slot == 0) { |
1638 DCHECK(input); | 1638 DCHECK(input.node()); |
1639 Emit(kPPC_PushFrame, g.NoOutput(), g.UseRegister(input), | 1639 Emit(kPPC_PushFrame, g.NoOutput(), g.UseRegister(input.node()), |
1640 g.TempImmediate(num_slots)); | 1640 g.TempImmediate(num_slots)); |
1641 } else { | 1641 } else { |
1642 // Skip any alignment holes in pushed nodes. | 1642 // Skip any alignment holes in pushed nodes. |
1643 if (input) { | 1643 if (input.node()) { |
1644 Emit(kPPC_StoreToStackSlot, g.NoOutput(), g.UseRegister(input), | 1644 Emit(kPPC_StoreToStackSlot, g.NoOutput(), g.UseRegister(input.node()), |
1645 g.TempImmediate(slot)); | 1645 g.TempImmediate(slot)); |
1646 } | 1646 } |
1647 } | 1647 } |
1648 ++slot; | 1648 ++slot; |
1649 } | 1649 } |
1650 } | 1650 } |
1651 } | 1651 } |
1652 | 1652 |
1653 | 1653 |
1654 bool InstructionSelector::IsTailCallAddressImmediate() { return false; } | 1654 bool InstructionSelector::IsTailCallAddressImmediate() { return false; } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 MachineOperatorBuilder::kFloat64RoundTruncate | | 1711 MachineOperatorBuilder::kFloat64RoundTruncate | |
1712 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1712 MachineOperatorBuilder::kFloat64RoundTiesAway | |
1713 MachineOperatorBuilder::kWord32Popcnt | | 1713 MachineOperatorBuilder::kWord32Popcnt | |
1714 MachineOperatorBuilder::kWord64Popcnt; | 1714 MachineOperatorBuilder::kWord64Popcnt; |
1715 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. | 1715 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. |
1716 } | 1716 } |
1717 | 1717 |
1718 } // namespace compiler | 1718 } // namespace compiler |
1719 } // namespace internal | 1719 } // namespace internal |
1720 } // namespace v8 | 1720 } // namespace v8 |
OLD | NEW |