Commit 1ce0c957 authored by James Eder's avatar James Eder Committed by Alexandre Julliard

ntdll: Add support for cpuid on x86_64.

parent 60c60ece
......@@ -827,6 +827,13 @@ static inline void do_cpuid(unsigned int ax, unsigned int *p)
"popl %%ebx"
: "=a" (p[0]), "=S" (p[1]), "=c" (p[2]), "=d" (p[3])
: "0" (ax));
#elif defined(__x86_64__)
__asm__("push %%rbx\n\t"
"cpuid\n\t"
"movq %%rbx, %%rsi\n\t"
"pop %%rbx"
: "=a" (p[0]), "=S" (p[1]), "=c" (p[2]), "=d" (p[3])
: "0" (ax));
#endif
}
......@@ -848,6 +855,8 @@ static inline int have_cpuid(void)
: "=&r" (f1), "=&r" (f2)
: "ir" (0x00200000));
return ((f1^f2) & 0x00200000) != 0;
#elif defined(__x86_64__)
return 1;
#else
return 0;
#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