util: Force ESI register for cpuid's ebx result.

Fixes a segfault and better code. Unfortunately using an arbitrary
register ("=r") causes the gcc to abort when the code is optimized saying
it can't satisfy the constraint. Setting seems to do the trick.
This commit is contained in:
José Fonseca 2009-10-09 13:22:42 +01:00
parent 69588d7ed5
commit c595dea23c

View file

@ -346,7 +346,7 @@ cpuid(uint32_t ax, uint32_t *p)
"cpuid\n\t"
"xchgl %%ebx, %1"
: "=a" (p[0]),
"=m" (p[1]),
"=S" (p[1]),
"=c" (p[2]),
"=d" (p[3])
: "0" (ax)