summaryrefslogtreecommitdiff
blob: e89c5456ec552e4e43a684ec8e1f5b67f67b51a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- bench/benchmarks.c
+++ bench/benchmarks.c
@@ -14,7 +14,10 @@
 		return;
 
 	TIME(asm volatile("int $0x80" :"=a" (ret) :"0" (__NR_getppid)), "int 0x80");
-	TIME(asm volatile("cpuid": : :"ax", "dx", "cx", "bx"), "cpuid");
+	TIME(asm volatile("movl %%ebx,%%edi\n"
+	                  "cpuid\n"
+	                  "movl %%edi,%%ebx\n"
+	                  : : :"%eax", "%edx", "%ecx", "%edi"), "cpuid");
 
 	TIME(asm volatile("addl $1,0(%esp)"), "addl");
 	TIME(asm volatile("lock ; addl $1,0(%esp)"), "locked add");