--- lshw-B.02.11.01.orig/src/core/cpuid.cc 2007-08-12 19:36:13.000000000 +0200 +++ lshw-B.02.11.01/src/core/cpuid.cc 2007-08-12 19:47:31.000000000 +0200 @@ -72,9 +72,6 @@ #ifdef __i386__ -#define cpuid_up(in,a,b,c,d)\ -asm("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (in)); - static void cpuid(int cpunumber, unsigned long idx, unsigned long &eax, @@ -100,7 +97,21 @@ edx = (*(unsigned long *) (buffer + 12)); } else - cpuid_up(idx, eax, ebx, ecx, edx); + asm( +#ifdef __PIC__ + "movl %%ebx,%%edi\n" + "cpuid\n" + "movl %%ebx,%3\n" + "movl %%edi,%%ebx\n" + : "=a" (eax), "=c" (ecx), "=d" (edx), "=m" (ebx) + : "a" (idx) + : "edi" +#else + "cpuid\n" + : "=a" (eax), "=c" (ecx), "=d" (edx), "=b" (ebx) + : "a" (idx) +#endif + ); }