Revision 8b4d077f libavcodec/i386/cputest.c

View differences:

libavcodec/i386/cputest.c
27 27
{
28 28
    int rval;
29 29
    int eax, ebx, ecx, edx;
30
    long a, c;
30 31
    
31 32
    __asm__ __volatile__ (
32 33
                          /* See if CPUID instruction is supported ... */
33 34
                          /* ... Get copies of EFLAGS into eax and ecx */
34 35
                          "pushf\n\t"
35 36
                          "pop %0\n\t"
36
                          "movl %0, %1\n\t"
37
                          "mov %0, %1\n\t"
37 38
                          
38 39
                          /* ... Toggle the ID bit in one copy and store */
39 40
                          /*     to the EFLAGS reg */
40
                          "xorl $0x200000, %0\n\t"
41
                          "xor $0x200000, %0\n\t"
41 42
                          "push %0\n\t"
42 43
                          "popf\n\t"
43 44
                          
44 45
                          /* ... Get the (hopefully modified) EFLAGS */
45 46
                          "pushf\n\t"
46 47
                          "pop %0\n\t"
47
                          : "=a" (eax), "=c" (ecx)
48
                          : "=a" (a), "=c" (c)
48 49
                          :
49 50
                          : "cc" 
50 51
                          );
51 52
    
52
    if (eax == ecx)
53
    if (a == c)
53 54
        return 0; /* CPUID not supported */
54 55
    
55 56
    cpuid(0, eax, ebx, ecx, edx);

Also available in: Unified diff