GCC inline restrictions were not adequate.
authorFritz Koenig <frkoenig@google.com>
Tue, 12 Oct 2010 16:42:03 +0000 (09:42 -0700)
committerFritz Koenig <frkoenig@google.com>
Tue, 12 Oct 2010 17:12:23 +0000 (10:12 -0700)
=r was not restrictive enough and the compiler was not returning
ebx correctly.

Change-Id: I7606e384067bd5fb69189802f1ff64ccc5aa02d6

vpx_ports/x86.h

index a8e4607..05a4591 100644 (file)
 #else
 #define cpuid(func,ax,bx,cx,dx)\
     __asm__ __volatile__ (\
-                          "pushl %%ebx     \n\t" \
-                          "cpuid           \n\t" \
-                          "movl  %%ebx, %1 \n\t" \
-                          "popl  %%ebx     \n\t" \
-                          : "=a" (ax), "=r" (bx), "=c" (cx), "=d" (dx) \
-                          : "a"  (func));
+                          "mov %%ebx, %%edi   \n\t" \
+                          "cpuid              \n\t" \
+                          "xchg %%edi, %%ebx  \n\t" \
+                          : "=a" (ax), "=D" (bx), "=c" (cx), "=d" (dx) \
+                          : "a" (func));
 #endif
 #else
 #if ARCH_X86_64