Kaydet (Commit) 7329b442 authored tarafından jan Iversen's avatar jan Iversen

cpuid is only for x86 processors.

clang for macOS did not like cpuid when compiling for arm cpu.

Change-Id: Iede658a524e5c3e1aa2d33137ed399679b021987
üst 57768926
......@@ -25,11 +25,18 @@ void getCpuId(uint32_t array[4])
__cpuid(reinterpret_cast<int*>(array), 1);
}
#else
#if (defined(__i386__) || defined(__x86_64__))
#include <cpuid.h>
void getCpuId(uint32_t array[4])
{
__get_cpuid(1, array + 0, array + 1, array + 2, array + 3);
}
#else
void getCpuId(uint32_t array[4])
{
array[0] = array[1] = array[2] = array[3] = 0;
}
#endif
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment