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:
parent
344ca5d360
commit
7423c74deb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue