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