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/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1750 | 1750 |
1751 | 1751 |
1752 void InstructionSelector::VisitFloat64Mod(Node* node) { | 1752 void InstructionSelector::VisitFloat64Mod(Node* node) { |
1753 Arm64OperandGenerator g(this); | 1753 Arm64OperandGenerator g(this); |
1754 Emit(kArm64Float64Mod, g.DefineAsFixed(node, d0), | 1754 Emit(kArm64Float64Mod, g.DefineAsFixed(node, d0), |
1755 g.UseFixed(node->InputAt(0), d0), | 1755 g.UseFixed(node->InputAt(0), d0), |
1756 g.UseFixed(node->InputAt(1), d1))->MarkAsCall(); | 1756 g.UseFixed(node->InputAt(1), d1))->MarkAsCall(); |
1757 } | 1757 } |
1758 | 1758 |
1759 | 1759 |
1760 void InstructionSelector::VisitFloat32Max(Node* node) { | |
1761 VisitRRR(this, kArm64Float32Max, node); | |
1762 } | |
1763 | |
1764 | |
1765 void InstructionSelector::VisitFloat64Max(Node* node) { | 1760 void InstructionSelector::VisitFloat64Max(Node* node) { |
1766 VisitRRR(this, kArm64Float64Max, node); | 1761 VisitRRR(this, kArm64Float64Max, node); |
1767 } | 1762 } |
1768 | 1763 |
1769 | 1764 |
1770 void InstructionSelector::VisitFloat32Min(Node* node) { | |
1771 VisitRRR(this, kArm64Float32Min, node); | |
1772 } | |
1773 | |
1774 | |
1775 void InstructionSelector::VisitFloat64Min(Node* node) { | 1765 void InstructionSelector::VisitFloat64Min(Node* node) { |
1776 VisitRRR(this, kArm64Float64Min, node); | 1766 VisitRRR(this, kArm64Float64Min, node); |
1777 } | 1767 } |
1778 | 1768 |
1779 | 1769 |
1780 void InstructionSelector::VisitFloat32Abs(Node* node) { | 1770 void InstructionSelector::VisitFloat32Abs(Node* node) { |
1781 VisitRR(this, kArm64Float32Abs, node); | 1771 VisitRR(this, kArm64Float32Abs, node); |
1782 } | 1772 } |
1783 | 1773 |
1784 | 1774 |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2691 inputs[input_count++] = g.UseUniqueRegister(base); | 2681 inputs[input_count++] = g.UseUniqueRegister(base); |
2692 inputs[input_count++] = g.UseUniqueRegister(index); | 2682 inputs[input_count++] = g.UseUniqueRegister(index); |
2693 inputs[input_count++] = g.UseUniqueRegister(value); | 2683 inputs[input_count++] = g.UseUniqueRegister(value); |
2694 InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); | 2684 InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); |
2695 Emit(code, 0, nullptr, input_count, inputs); | 2685 Emit(code, 0, nullptr, input_count, inputs); |
2696 } | 2686 } |
2697 | 2687 |
2698 // static | 2688 // static |
2699 MachineOperatorBuilder::Flags | 2689 MachineOperatorBuilder::Flags |
2700 InstructionSelector::SupportedMachineOperatorFlags() { | 2690 InstructionSelector::SupportedMachineOperatorFlags() { |
2701 return MachineOperatorBuilder::kFloat32Max | | 2691 return MachineOperatorBuilder::kFloat32RoundDown | |
2702 MachineOperatorBuilder::kFloat32Min | | |
2703 MachineOperatorBuilder::kFloat32RoundDown | | |
2704 MachineOperatorBuilder::kFloat64Max | | |
2705 MachineOperatorBuilder::kFloat64Min | | |
2706 MachineOperatorBuilder::kFloat64RoundDown | | 2692 MachineOperatorBuilder::kFloat64RoundDown | |
2707 MachineOperatorBuilder::kFloat32RoundUp | | 2693 MachineOperatorBuilder::kFloat32RoundUp | |
2708 MachineOperatorBuilder::kFloat64RoundUp | | 2694 MachineOperatorBuilder::kFloat64RoundUp | |
2709 MachineOperatorBuilder::kFloat32RoundTruncate | | 2695 MachineOperatorBuilder::kFloat32RoundTruncate | |
2710 MachineOperatorBuilder::kFloat64RoundTruncate | | 2696 MachineOperatorBuilder::kFloat64RoundTruncate | |
2711 MachineOperatorBuilder::kFloat64RoundTiesAway | | 2697 MachineOperatorBuilder::kFloat64RoundTiesAway | |
2712 MachineOperatorBuilder::kFloat32RoundTiesEven | | 2698 MachineOperatorBuilder::kFloat32RoundTiesEven | |
2713 MachineOperatorBuilder::kFloat64RoundTiesEven | | 2699 MachineOperatorBuilder::kFloat64RoundTiesEven | |
2714 MachineOperatorBuilder::kWord32ShiftIsSafe | | 2700 MachineOperatorBuilder::kWord32ShiftIsSafe | |
2715 MachineOperatorBuilder::kInt32DivIsSafe | | 2701 MachineOperatorBuilder::kInt32DivIsSafe | |
2716 MachineOperatorBuilder::kUint32DivIsSafe | | 2702 MachineOperatorBuilder::kUint32DivIsSafe | |
2717 MachineOperatorBuilder::kWord32ReverseBits | | 2703 MachineOperatorBuilder::kWord32ReverseBits | |
2718 MachineOperatorBuilder::kWord64ReverseBits | | 2704 MachineOperatorBuilder::kWord64ReverseBits | |
2719 MachineOperatorBuilder::kFloat32Neg | | 2705 MachineOperatorBuilder::kFloat32Neg | |
2720 MachineOperatorBuilder::kFloat64Neg; | 2706 MachineOperatorBuilder::kFloat64Neg; |
2721 } | 2707 } |
2722 | 2708 |
2723 // static | 2709 // static |
2724 MachineOperatorBuilder::AlignmentRequirements | 2710 MachineOperatorBuilder::AlignmentRequirements |
2725 InstructionSelector::AlignmentRequirements() { | 2711 InstructionSelector::AlignmentRequirements() { |
2726 return MachineOperatorBuilder::AlignmentRequirements:: | 2712 return MachineOperatorBuilder::AlignmentRequirements:: |
2727 FullUnalignedAccessSupport(); | 2713 FullUnalignedAccessSupport(); |
2728 } | 2714 } |
2729 | 2715 |
2730 } // namespace compiler | 2716 } // namespace compiler |
2731 } // namespace internal | 2717 } // namespace internal |
2732 } // namespace v8 | 2718 } // namespace v8 |
OLD | NEW |