You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-apps/x86info/files/1.21-pic.patch

16 lines
717 B

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");