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 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1698 inputs[input_count++] = g.UseUniqueRegister(value); | 1698 inputs[input_count++] = g.UseUniqueRegister(value); |
1699 InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); | 1699 InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); |
1700 Emit(code, 0, nullptr, input_count, inputs); | 1700 Emit(code, 0, nullptr, input_count, inputs); |
1701 } | 1701 } |
1702 | 1702 |
1703 // static | 1703 // static |
1704 MachineOperatorBuilder::Flags | 1704 MachineOperatorBuilder::Flags |
1705 InstructionSelector::SupportedMachineOperatorFlags() { | 1705 InstructionSelector::SupportedMachineOperatorFlags() { |
1706 MachineOperatorBuilder::Flags flags = | 1706 MachineOperatorBuilder::Flags flags = |
1707 MachineOperatorBuilder::kWord32ShiftIsSafe | | 1707 MachineOperatorBuilder::kWord32ShiftIsSafe | |
1708 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kFloat32Neg | | 1708 MachineOperatorBuilder::kWord32Ctz; |
1709 MachineOperatorBuilder::kFloat64Neg; | |
1710 if (CpuFeatures::IsSupported(POPCNT)) { | 1709 if (CpuFeatures::IsSupported(POPCNT)) { |
1711 flags |= MachineOperatorBuilder::kWord32Popcnt; | 1710 flags |= MachineOperatorBuilder::kWord32Popcnt; |
1712 } | 1711 } |
1713 if (CpuFeatures::IsSupported(SSE4_1)) { | 1712 if (CpuFeatures::IsSupported(SSE4_1)) { |
1714 flags |= MachineOperatorBuilder::kFloat32RoundDown | | 1713 flags |= MachineOperatorBuilder::kFloat32RoundDown | |
1715 MachineOperatorBuilder::kFloat64RoundDown | | 1714 MachineOperatorBuilder::kFloat64RoundDown | |
1716 MachineOperatorBuilder::kFloat32RoundUp | | 1715 MachineOperatorBuilder::kFloat32RoundUp | |
1717 MachineOperatorBuilder::kFloat64RoundUp | | 1716 MachineOperatorBuilder::kFloat64RoundUp | |
1718 MachineOperatorBuilder::kFloat32RoundTruncate | | 1717 MachineOperatorBuilder::kFloat32RoundTruncate | |
1719 MachineOperatorBuilder::kFloat64RoundTruncate | | 1718 MachineOperatorBuilder::kFloat64RoundTruncate | |
1720 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1719 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1721 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1720 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1722 } | 1721 } |
1723 return flags; | 1722 return flags; |
1724 } | 1723 } |
1725 | 1724 |
1726 // static | 1725 // static |
1727 MachineOperatorBuilder::AlignmentRequirements | 1726 MachineOperatorBuilder::AlignmentRequirements |
1728 InstructionSelector::AlignmentRequirements() { | 1727 InstructionSelector::AlignmentRequirements() { |
1729 return MachineOperatorBuilder::AlignmentRequirements:: | 1728 return MachineOperatorBuilder::AlignmentRequirements:: |
1730 FullUnalignedAccessSupport(); | 1729 FullUnalignedAccessSupport(); |
1731 } | 1730 } |
1732 | 1731 |
1733 } // namespace compiler | 1732 } // namespace compiler |
1734 } // namespace internal | 1733 } // namespace internal |
1735 } // namespace v8 | 1734 } // namespace v8 |
OLD | NEW |