X-Git-Url: https://git.distorted.org.uk/~mdw/misc/blobdiff_plain/413f75403bde6b1d19df67ffb7329a41212c1868..8fc3647061acb492fe5cb01d7d2820d7489d31e0:/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),