Mercurial > libavcodec.hg
changeset 2300:40542ea560d5 libavcodec
gcc 3.4.3 preversions do not appreciate invalid instruction and operand combinations anymore patch by (Aurelien Jacobs <aurel at gnuage dot org>)
author | michael |
---|---|
date | Sun, 17 Oct 2004 20:27:11 +0000 |
parents | eb0c851db536 |
children | 79b14ad60f81 |
files | i386/cputest.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/i386/cputest.c Fri Oct 15 11:48:50 2004 +0000 +++ b/i386/cputest.c Sun Oct 17 20:27:11 2004 +0000 @@ -27,29 +27,30 @@ { int rval; int eax, ebx, ecx, edx; + long a, c; __asm__ __volatile__ ( /* See if CPUID instruction is supported ... */ /* ... Get copies of EFLAGS into eax and ecx */ "pushf\n\t" "pop %0\n\t" - "movl %0, %1\n\t" + "mov %0, %1\n\t" /* ... Toggle the ID bit in one copy and store */ /* to the EFLAGS reg */ - "xorl $0x200000, %0\n\t" + "xor $0x200000, %0\n\t" "push %0\n\t" "popf\n\t" /* ... Get the (hopefully modified) EFLAGS */ "pushf\n\t" "pop %0\n\t" - : "=a" (eax), "=c" (ecx) + : "=a" (a), "=c" (c) : : "cc" ); - if (eax == ecx) + if (a == c) return 0; /* CPUID not supported */ cpuid(0, eax, ebx, ecx, edx);