Commit 36dfb90c authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Fix the cpuid macro for x86_64 non-gcc build

Change-Id: I0c44800db10db8d74c1ddfe89abecfd1c53d0f8d
parent 5925ba08
......@@ -71,11 +71,11 @@ typedef enum {
#else /* end __SUNPRO__ */
#if ARCH_X86_64
void __cpuid(int CPUInfo[4], int info_type);
#pragma intrinsic(__cpuid)
void __cpuidex(int CPUInfo[4], int info_type, int ecxvalue);
#pragma intrinsic(__cpuidex)
#define cpuid(func, func2, a, b, c, d) do {\
int regs[4];\
__cpuid(regs, func, func2);
__cpuidex(regs, func, func2); \
a = regs[0]; b = regs[1]; c = regs[2]; d = regs[3];\
} while(0)
Supports Markdown
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