aboutsummaryrefslogtreecommitdiff
path: root/src/bug_report.cpp
diff options
context:
space:
mode:
authorHenry Dooley <henry.dooley@gmail.com>2021-11-04 18:52:25 -0700
committerHenry Dooley <henry.dooley@gmail.com>2021-11-04 18:54:15 -0700
commit3d0cd6f0dc939bdc34884b24a40fc583632d6d7a (patch)
tree12b7638e49d8d689a052b783082a3f939e26d7ac /src/bug_report.cpp
parentadb5928767b641132dd34ce44616877f635e71bb (diff)
don't try to use __cpuid() on arm64
Diffstat (limited to 'src/bug_report.cpp')
-rw-r--r--src/bug_report.cpp15
1 files changed, 11 insertions, 4 deletions
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
}