1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
diff -Nuar x86info-1.21.orig/bench/benchmarks.c x86info-1.21/bench/benchmarks.c
--- x86info-1.21.orig/bench/benchmarks.c 2007-11-26 17:53:58.278467889 -0800
+++ x86info-1.21/bench/benchmarks.c 2007-11-26 17:54:32.014318066 -0800
@@ -19,7 +19,10 @@
#ifdef __linux__
TIME(asm volatile("int $0x80" :"=a" (tmp) :"0" (__NR_getppid)), "int 0x80");
#endif
- 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");
|