projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69588d7
)
util: Force ESI register for cpuid's ebx result.
author
José Fonseca
<jfonseca@vmware.com>
Fri, 9 Oct 2009 12:22:42 +0000
(13:22 +0100)
committer
José Fonseca
<jfonseca@vmware.com>
Fri, 9 Oct 2009 12:22:42 +0000
(13:22 +0100)
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.
src/gallium/auxiliary/util/u_cpu_detect.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_cpu_detect.c
b/src/gallium/auxiliary/util/u_cpu_detect.c
index 70ce25cfcf4c750aa608a6e00ba9d0f134cc00a2..ded361ce704bff59b93f6c8a3fe865d7c9c92d42 100644
(file)
--- a/
src/gallium/auxiliary/util/u_cpu_detect.c
+++ b/
src/gallium/auxiliary/util/u_cpu_detect.c
@@
-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)