Commit a6ddf6ea authored by michael's avatar michael

gcc 3.4.3 preversions do not appreciate invalid instruction and operand...

gcc 3.4.3 preversions do not appreciate invalid instruction and operand combinations anymore patch by (Aurelien Jacobs <aurel at gnuage dot org>)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3604 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c940b5f8
...@@ -27,29 +27,30 @@ int mm_support(void) ...@@ -27,29 +27,30 @@ int mm_support(void)
{ {
int rval; int rval;
int eax, ebx, ecx, edx; int eax, ebx, ecx, edx;
long a, c;
__asm__ __volatile__ ( __asm__ __volatile__ (
/* See if CPUID instruction is supported ... */ /* See if CPUID instruction is supported ... */
/* ... Get copies of EFLAGS into eax and ecx */ /* ... Get copies of EFLAGS into eax and ecx */
"pushf\n\t" "pushf\n\t"
"pop %0\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 */ /* ... Toggle the ID bit in one copy and store */
/* to the EFLAGS reg */ /* to the EFLAGS reg */
"xorl $0x200000, %0\n\t" "xor $0x200000, %0\n\t"
"push %0\n\t" "push %0\n\t"
"popf\n\t" "popf\n\t"
/* ... Get the (hopefully modified) EFLAGS */ /* ... Get the (hopefully modified) EFLAGS */
"pushf\n\t" "pushf\n\t"
"pop %0\n\t" "pop %0\n\t"
: "=a" (eax), "=c" (ecx) : "=a" (a), "=c" (c)
: :
: "cc" : "cc"
); );
if (eax == ecx) if (a == c)
return 0; /* CPUID not supported */ return 0; /* CPUID not supported */
cpuid(0, eax, ebx, ecx, edx); cpuid(0, eax, ebx, ecx, edx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment