Commit 0e544824 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

include: Implement __cpuidex() function.

parent 22f4b6fc
...@@ -12,9 +12,13 @@ extern "C" { ...@@ -12,9 +12,13 @@ extern "C" {
#endif #endif
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__x86_64__)
static inline void __cpuidex(int info[4], int ax, int cx)
{
__asm__ ("cpuid" : "=a"(info[0]), "=b" (info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(ax), "c"(cx));
}
static inline void __cpuid(int info[4], int ax) static inline void __cpuid(int info[4], int ax)
{ {
__asm__ ("cpuid" : "=a"(info[0]), "=b" (info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(ax), "c"(0)); return __cpuidex(info, ax, 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