Force the "ebx" argument to be mapped to a register (not necessarily EBX).

Fixes crash on x86 under OS X.
Thanks to kiesel for the fix and to shuffle2 for remembering the problem.
This commit is contained in:
Maarten ter Huurne 2011-12-12 00:43:23 +01:00
parent 344ca5d360
commit 7423c74deb
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
"movl %%ebx,%1;"
"mov %%rdi,%%rbx;"
: "=a" (*eax),
"=g" (*ebx),
"=r" (*ebx),
"=c" (*ecx),
"=d" (*edx)
: "a" (*eax)
@ -61,7 +61,7 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
"movl %%ebx,%1;"
"movl %%edi,%%ebx;"
: "=a" (*eax),
"=g" (*ebx),
"=r" (*ebx),
"=c" (*ecx),
"=d" (*edx)
: "a" (*eax)