Merge "Fix the cpuid macro for x86_64 non-gcc build"
This commit is contained in:
commit
16ad35f64e
@ -71,11 +71,11 @@ typedef enum {
|
|||||||
#endif
|
#endif
|
||||||
#else /* end __SUNPRO__ */
|
#else /* end __SUNPRO__ */
|
||||||
#if ARCH_X86_64
|
#if ARCH_X86_64
|
||||||
void __cpuid(int CPUInfo[4], int info_type);
|
void __cpuidex(int CPUInfo[4], int info_type, int ecxvalue);
|
||||||
#pragma intrinsic(__cpuid)
|
#pragma intrinsic(__cpuidex)
|
||||||
#define cpuid(func, func2, a, b, c, d) do {\
|
#define cpuid(func, func2, a, b, c, d) do {\
|
||||||
int regs[4];\
|
int regs[4];\
|
||||||
__cpuid(regs, func, func2);
|
__cpuidex(regs, func, func2); \
|
||||||
a = regs[0]; b = regs[1]; c = regs[2]; d = regs[3];\
|
a = regs[0]; b = regs[1]; c = regs[2]; d = regs[3];\
|
||||||
} while(0)
|
} while(0)
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user