PIE on i686 uses %ebx as a base register. Don't clobber it across the
CPUID instruction.
https://bugs.gentoo.org/show_bug.cgi?id=341271
https://bugzilla.redhat.com/show_bug.cgi?id=804282
unsigned int *sig32 = (unsigned int *) sig;
asm volatile (
- "xor %%ebx, %%ebx; cpuid"
- : "=a" (eax), "=b" (sig32[0]), "=c" (sig32[1]), "=d" (sig32[2])
+ "xchgl %%ebx,%1; xor %%ebx,%%ebx; cpuid; xchgl %%ebx,%1"
+ : "=a" (eax), "+r" (sig32[0]), "=c" (sig32[1]), "=d" (sig32[2])
: "0" (eax));
sig[12] = 0;