avutil/x86/cpu: fix cpuid sub-leaf selection
authorlvqcl <lvqcl.mail@gmail.com>
Sat, 27 Sep 2014 11:21:31 +0000 (13:21 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 4 Oct 2014 21:52:28 +0000 (23:52 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e58fc44649d07d523fcd17aa10d9eb0d3a5ef3f4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/x86/cpu.c

index 8ad4784..2b62e92 100644 (file)
@@ -45,7 +45,7 @@
         "cpuid                       \n\t"                      \
         "xchg   %%"REG_b", %%"REG_S                             \
         : "=a" (eax), "=S" (ebx), "=c" (ecx), "=d" (edx)        \
-        : "0" (index))
+        : "0" (index), "2"(0))
 
 #define xgetbv(index, eax, edx)                                 \
     __asm__ (".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c" (index))