1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-06 15:42:38 -05:00

Detect CPU name and AES instructions on Windows ARM64.

This commit is contained in:
XMRig
2025-06-13 21:02:10 +07:00
parent 57a4998ae2
commit 9e7cf69ac3

View File

@@ -18,10 +18,15 @@
#include "backend/cpu/platform/BasicCpuInfo.h"
#include <Windows.h>
void xmrig::BasicCpuInfo::init_arm()
{
# if __ARM_FEATURE_CRYPTO
m_flags.set(FLAG_AES, true); // FIXME
# endif
DWORD size = sizeof(m_brand) - 1;
const char *subkey = "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
RegGetValueA(HKEY_LOCAL_MACHINE, subkey, "ProcessorNameString", RRF_RT_REG_SZ, nullptr, m_brand, &size);
m_flags.set(FLAG_AES, IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE));
}