Files
FEX-Emu--FEX/Source/Windows/Common/CPUFeatures.h
T
Billy Laws 3cbc421c7e Windows: Detect CPU features using the registry
Native Windows does not support ID instruction emulation, instead it
populates registry keys containing their values.
2024-08-13 13:31:32 +00:00

37 lines
723 B
C++

// SPDX-License-Identifier: MIT
#pragma once
#include <windef.h>
#include <winternl.h>
#include <Common/HostFeatures.h>
namespace FEXCore::Context {
class Context;
}
/**
* @brief Maps CPUID results to Windows CPU info structures
*/
namespace FEX::Windows {
class CPUFeatures {
public:
static FEXCore::HostFeatures FetchHostFeatures(bool IsWine);
CPUFeatures(FEXCore::Context::Context& CTX);
/**
* @brief If the given PF_* feature is supported
*/
bool IsFeaturePresent(uint32_t Feature);
/**
* @brief Fills in `Info` according to the detected CPU features
*/
void UpdateInformation(SYSTEM_CPU_INFORMATION* Info);
private:
SYSTEM_CPU_INFORMATION CpuInfo {};
};
} // namespace FEX::Windows