mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
don't try to use __cpuid() on arm64
This commit is contained in:
+11
-4
@@ -146,10 +146,17 @@ void report_windows_product_type(DWORD ProductType) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void odin_cpuid(int leaf, int result[]) {
|
void odin_cpuid(int leaf, int result[]) {
|
||||||
#if defined(GB_COMPILER_MSVC)
|
#if defined(GB_CPU_ARM)
|
||||||
__cpuid(result, leaf);
|
return;
|
||||||
#else
|
|
||||||
__get_cpuid(leaf, (unsigned int*)&result[0], (unsigned int*)&result[1], (unsigned int*)&result[2], (unsigned int*)&result[3]);
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user