X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-what-cpuid-helper.c;h=7812545d2647c7781e644aa717cafd04338a2e9e;hb=5c4bdcf6abe012dbc4965e5bede00c8a9d31a8f6;hp=8b81be3db6884c2ec0d1a3005b1b472b59f0ad4d;hpb=300c5168ca007ed5fbd49189efbe66ae0dbd9ad1;p=virt-what.git diff --git a/virt-what-cpuid-helper.c b/virt-what-cpuid-helper.c index 8b81be3..7812545 100644 --- a/virt-what-cpuid-helper.c +++ b/virt-what-cpuid-helper.c @@ -31,8 +31,8 @@ cpuid (unsigned int eax, char *sig) 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;