X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/misc/blobdiff_plain/e72ffec772692374130a65a2e2129b19ab1dad4d..ed68d9a61a11bc1ba3f80c1b51c2715906c62f87:/x86-model.c diff --git a/x86-model.c b/x86-model.c index cb90fb3..05c47c6 100644 --- a/x86-model.c +++ b/x86-model.c @@ -32,7 +32,7 @@ #include #include -#if !defined(__GNUC__) || !defined(__i386__) +#if !defined(__GNUC__) || (!defined(__i386__) && !defined(__amd64__)) # error "This isn't going to work." #endif @@ -44,6 +44,7 @@ struct cpuid { unsigned eax, ebx, ecx, edx; }; static inline void cpuid(unsigned leaf, struct cpuid *c) { + __asm__ ("cpuid" : "=a" (c->eax), "=b" (c->ebx),