From 3d0cd6f0dc939bdc34884b24a40fc583632d6d7a Mon Sep 17 00:00:00 2001 From: Henry Dooley Date: Thu, 4 Nov 2021 18:52:25 -0700 Subject: don't try to use __cpuid() on arm64 --- src/bug_report.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/bug_report.cpp') diff --git a/src/bug_report.cpp b/src/bug_report.cpp index 5249cc3a4..27e7fcf9a 100644 --- a/src/bug_report.cpp +++ b/src/bug_report.cpp @@ -146,10 +146,17 @@ void report_windows_product_type(DWORD ProductType) { #endif void odin_cpuid(int leaf, int result[]) { - #if defined(GB_COMPILER_MSVC) - __cpuid(result, leaf); - #else - __get_cpuid(leaf, (unsigned int*)&result[0], (unsigned int*)&result[1], (unsigned int*)&result[2], (unsigned int*)&result[3]); + #if defined(GB_CPU_ARM) + return; + + #elif defined(GB_CPU_X86) + + #if defined(GB_COMPILER_MSVC) + __cpuid(result, leaf); + #else + __get_cpuid(leaf, (unsigned int*)&result[0], (unsigned int*)&result[1], (unsigned int*)&result[2], (unsigned int*)&result[3]); + #endif + #endif } -- cgit v1.2.3