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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 2168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2179 inputs[input_count++] = g.UseUniqueRegister(value); | 2179 inputs[input_count++] = g.UseUniqueRegister(value); |
2180 InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); | 2180 InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); |
2181 Emit(code, 0, static_cast<InstructionOperand*>(nullptr), input_count, inputs); | 2181 Emit(code, 0, static_cast<InstructionOperand*>(nullptr), input_count, inputs); |
2182 } | 2182 } |
2183 | 2183 |
2184 // static | 2184 // static |
2185 MachineOperatorBuilder::Flags | 2185 MachineOperatorBuilder::Flags |
2186 InstructionSelector::SupportedMachineOperatorFlags() { | 2186 InstructionSelector::SupportedMachineOperatorFlags() { |
2187 MachineOperatorBuilder::Flags flags = | 2187 MachineOperatorBuilder::Flags flags = |
2188 MachineOperatorBuilder::kWord32ShiftIsSafe | | 2188 MachineOperatorBuilder::kWord32ShiftIsSafe | |
2189 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz | | 2189 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; |
2190 MachineOperatorBuilder::kFloat32Neg | MachineOperatorBuilder::kFloat64Neg; | |
2191 if (CpuFeatures::IsSupported(POPCNT)) { | 2190 if (CpuFeatures::IsSupported(POPCNT)) { |
2192 flags |= MachineOperatorBuilder::kWord32Popcnt | | 2191 flags |= MachineOperatorBuilder::kWord32Popcnt | |
2193 MachineOperatorBuilder::kWord64Popcnt; | 2192 MachineOperatorBuilder::kWord64Popcnt; |
2194 } | 2193 } |
2195 if (CpuFeatures::IsSupported(SSE4_1)) { | 2194 if (CpuFeatures::IsSupported(SSE4_1)) { |
2196 flags |= MachineOperatorBuilder::kFloat32RoundDown | | 2195 flags |= MachineOperatorBuilder::kFloat32RoundDown | |
2197 MachineOperatorBuilder::kFloat64RoundDown | | 2196 MachineOperatorBuilder::kFloat64RoundDown | |
2198 MachineOperatorBuilder::kFloat32RoundUp | | 2197 MachineOperatorBuilder::kFloat32RoundUp | |
2199 MachineOperatorBuilder::kFloat64RoundUp | | 2198 MachineOperatorBuilder::kFloat64RoundUp | |
2200 MachineOperatorBuilder::kFloat32RoundTruncate | | 2199 MachineOperatorBuilder::kFloat32RoundTruncate | |
2201 MachineOperatorBuilder::kFloat64RoundTruncate | | 2200 MachineOperatorBuilder::kFloat64RoundTruncate | |
2202 MachineOperatorBuilder::kFloat32RoundTiesEven | | 2201 MachineOperatorBuilder::kFloat32RoundTiesEven | |
2203 MachineOperatorBuilder::kFloat64RoundTiesEven; | 2202 MachineOperatorBuilder::kFloat64RoundTiesEven; |
2204 } | 2203 } |
2205 return flags; | 2204 return flags; |
2206 } | 2205 } |
2207 | 2206 |
2208 // static | 2207 // static |
2209 MachineOperatorBuilder::AlignmentRequirements | 2208 MachineOperatorBuilder::AlignmentRequirements |
2210 InstructionSelector::AlignmentRequirements() { | 2209 InstructionSelector::AlignmentRequirements() { |
2211 return MachineOperatorBuilder::AlignmentRequirements:: | 2210 return MachineOperatorBuilder::AlignmentRequirements:: |
2212 FullUnalignedAccessSupport(); | 2211 FullUnalignedAccessSupport(); |
2213 } | 2212 } |
2214 | 2213 |
2215 } // namespace compiler | 2214 } // namespace compiler |
2216 } // namespace internal | 2215 } // namespace internal |
2217 } // namespace v8 | 2216 } // namespace v8 |
OLD | NEW |