Commit e009d51a authored by Dmitry Fedin's avatar Dmitry Fedin

Fix for crash on 32-bit system in cpuid code

parent 129ad2f9
......@@ -31,8 +31,8 @@ kdb_cpuid_t *kdb_cpuid (void) {
}
int a;
#if ( __GNUC__ < 5 ) && defined( __i386__ ) && defined( __PIC__ )
asm volatile ("cpuid\n\t"
: "=a" (a), "=D" (cached.ebx) , "=c" (cached.ecx), "=d" (cached.edx)
asm volatile ("xchgl\t%%ebx, %1\n\tcpuid\n\txchgl\t%%ebx, %1\n\t"
: "=a" (a), "=r" (cached.ebx), "=c" (cached.ecx), "=d" (cached.edx)
: "0" (1)
);
#else
......
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