X-Git-Url: https://git.distorted.org.uk/~mdw/misc/blobdiff_plain/e72ffec772692374130a65a2e2129b19ab1dad4d..f9f9787aa08f519b3df9953a6b8877f7e65950f0:/x86-model.c?ds=sidebyside 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),