summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFritz Koenig <frkoenig@google.com>2010-10-12 09:42:03 -0700
committerFritz Koenig <frkoenig@google.com>2010-10-12 10:12:23 -0700
commite50f5d40376b3817fa2bf2e2b2fdf8a0084c3460 (patch)
tree832c3dc60d1e2c9c359525ac41838c9776f3c5f7
parent136857475ecbbcc4ae6fd24f8a9a82b5a2610e4a (diff)
downloadlibvpx-e50f5d40376b3817fa2bf2e2b2fdf8a0084c3460.tar
libvpx-e50f5d40376b3817fa2bf2e2b2fdf8a0084c3460.tar.gz
libvpx-e50f5d40376b3817fa2bf2e2b2fdf8a0084c3460.tar.bz2
libvpx-e50f5d40376b3817fa2bf2e2b2fdf8a0084c3460.zip
GCC inline restrictions were not adequate.
=r was not restrictive enough and the compiler was not returning ebx correctly. Change-Id: I7606e384067bd5fb69189802f1ff64ccc5aa02d6
-rw-r--r--vpx_ports/x86.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/vpx_ports/x86.h b/vpx_ports/x86.h
index a8e4607cd..05a45917a 100644
--- a/vpx_ports/x86.h
+++ b/vpx_ports/x86.h
@@ -24,12 +24,11 @@
#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