summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/x86info/files/1.21-pic.patch')
-rw-r--r--sys-apps/x86info/files/1.21-pic.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys-apps/x86info/files/1.21-pic.patch b/sys-apps/x86info/files/1.21-pic.patch
new file mode 100644
index 000000000000..ddf24b293e14
--- /dev/null
+++ b/sys-apps/x86info/files/1.21-pic.patch
@@ -0,0 +1,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");