summaryrefslogtreecommitdiffstats
path: root/src/cpuid.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpuid.h')
-rw-r--r--src/cpuid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpuid.h b/src/cpuid.h
index 9382156..671be87 100644
--- a/src/cpuid.h
+++ b/src/cpuid.h
@@ -50,7 +50,7 @@
static inline uint64_t fastd_cpuid(void) {
unsigned eax, ebx, ecx, edx;
- __asm__("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (1));
+ __asm__ __volatile__ ("mov %%ebx, %%edi;" "cpuid;" "xchgl %%ebx, %%edi;" : "=a" (eax), "=D" (ebx), "=c" (ecx), "=d" (edx) : "a" (1));
return ((uint64_t)ecx) << 32 | edx;
}