mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
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:
parent
c4d54b62f5
commit
00ffef383c
1 changed files with 1 additions and 1 deletions
|
|
@ -346,7 +346,7 @@ cpuid(uint32_t ax, uint32_t *p)
|
||||||
"cpuid\n\t"
|
"cpuid\n\t"
|
||||||
"xchgl %%ebx, %1"
|
"xchgl %%ebx, %1"
|
||||||
: "=a" (p[0]),
|
: "=a" (p[0]),
|
||||||
"=m" (p[1]),
|
"=S" (p[1]),
|
||||||
"=c" (p[2]),
|
"=c" (p[2]),
|
||||||
"=d" (p[3])
|
"=d" (p[3])
|
||||||
: "0" (ax)
|
: "0" (ax)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue