// Copyright 2018 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_CODEGEN_CPU_FEATURES_H_ #define V8_CODEGEN_CPU_FEATURES_H_ #include "src/common/globals.h" namespace v8 { namespace internal { // CPU feature flags. enum CpuFeature { … }; // CpuFeatures keeps track of which features are supported by the target CPU. // Supported features must be enabled by a CpuFeatureScope before use. // Example: // if (assembler->IsSupported(SSE3)) { // CpuFeatureScope fscope(assembler, SSE3); // // Generate code containing SSE3 instructions. // } else { // // Generate alternative code. // } class V8_EXPORT_PRIVATE CpuFeatures : public AllStatic { … }; } // namespace internal } // namespace v8 #endif // V8_CODEGEN_CPU_FEATURES_H_