Commit e50f5d40 authored by Fritz Koenig's avatar Fritz Koenig
Browse files

GCC inline restrictions were not adequate.

=r was not restrictive enough and the compiler was not returning
ebx correctly.

Change-Id: I7606e384067bd5fb69189802f1ff64ccc5aa02d6
parent 13685747
...@@ -24,12 +24,11 @@ ...@@ -24,12 +24,11 @@
#else #else
#define cpuid(func,ax,bx,cx,dx)\ #define cpuid(func,ax,bx,cx,dx)\
__asm__ __volatile__ (\ __asm__ __volatile__ (\
"pushl %%ebx \n\t" \ "mov %%ebx, %%edi \n\t" \
"cpuid \n\t" \ "cpuid \n\t" \
"movl %%ebx, %1 \n\t" \ "xchg %%edi, %%ebx \n\t" \
"popl %%ebx \n\t" \ : "=a" (ax), "=D" (bx), "=c" (cx), "=d" (dx) \
: "=a" (ax), "=r" (bx), "=c" (cx), "=d" (dx) \ : "a" (func));
: "a" (func));
#endif #endif
#else #else
#if ARCH_X86_64 #if ARCH_X86_64
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment