Remove CPUID availability check on AMD64 as it's architectural.
Originally committed as revision 17543 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		
							parent
							
								
									f8c96d011e
								
							
						
					
					
						commit
						d05f808dc9
					
				@ -42,19 +42,13 @@ int mm_support(void)
 | 
				
			|||||||
    int rval = 0;
 | 
					    int rval = 0;
 | 
				
			||||||
    int eax, ebx, ecx, edx;
 | 
					    int eax, ebx, ecx, edx;
 | 
				
			||||||
    int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
 | 
					    int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
 | 
				
			||||||
    x86_reg a, c;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if ARCH_X86_64
 | 
					#if ARCH_X86_32
 | 
				
			||||||
#define PUSHF "pushfq\n\t"
 | 
					    x86_reg a, c;
 | 
				
			||||||
#define POPF "popfq\n\t"
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
#define PUSHF "pushfl\n\t"
 | 
					 | 
				
			||||||
#define POPF "popfl\n\t"
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
    __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
 | 
					        "pushfl\n\t"
 | 
				
			||||||
        "pop %0\n\t"
 | 
					        "pop %0\n\t"
 | 
				
			||||||
        "mov %0, %1\n\t"
 | 
					        "mov %0, %1\n\t"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -62,10 +56,10 @@ int mm_support(void)
 | 
				
			|||||||
        /*     to the EFLAGS reg */
 | 
					        /*     to the EFLAGS reg */
 | 
				
			||||||
        "xor $0x200000, %0\n\t"
 | 
					        "xor $0x200000, %0\n\t"
 | 
				
			||||||
        "push %0\n\t"
 | 
					        "push %0\n\t"
 | 
				
			||||||
        POPF
 | 
					        "popfl\n\t"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* ... Get the (hopefully modified) EFLAGS */
 | 
					        /* ... Get the (hopefully modified) EFLAGS */
 | 
				
			||||||
        PUSHF
 | 
					        "pushfl\n\t"
 | 
				
			||||||
        "pop %0\n\t"
 | 
					        "pop %0\n\t"
 | 
				
			||||||
        : "=a" (a), "=c" (c)
 | 
					        : "=a" (a), "=c" (c)
 | 
				
			||||||
        :
 | 
					        :
 | 
				
			||||||
@ -74,6 +68,7 @@ int mm_support(void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (a == c)
 | 
					    if (a == c)
 | 
				
			||||||
        return 0; /* CPUID not supported */
 | 
					        return 0; /* CPUID not supported */
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    cpuid(0, max_std_level, ebx, ecx, edx);
 | 
					    cpuid(0, max_std_level, ebx, ecx, edx);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user