History

Remove CPUID availability check on AMD64 as it's architectural.

Originally committed as revision 17543 to svn://svn.ffmpeg.org/ffmpeg/trunk

Zuxy Meng committed 17 years ago

Commit d05f8081 parent f8c96d01 file · +6 −11Browse files

Unified · Split

libavcodec/x86/cpuid.c+6−11
@@ -42,19 +42,13 @@ int mm_support(void) · 41 unmodified lines
4242 int rval = 0;
4343 int eax, ebx, ecx, edx;
4444 int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
45− x86_reg a, c;
4645
47−#if ARCH_X86_64
48−#define PUSHF "pushfq\n\t"
49−#define POPF "popfq\n\t"
50−#else
51−#define PUSHF "pushfl\n\t"
52−#define POPF "popfl\n\t"
53−#endif
46+#if ARCH_X86_32
47+ x86_reg a, c;
5448 __asm__ volatile (
5549 /* See if CPUID instruction is supported ... */
5650 /* ... Get copies of EFLAGS into eax and ecx */
57− PUSHF
51+ "pushfl\n\t"
5852 "pop %0\n\t"
5953 "mov %0, %1\n\t"
6054
@@ -62,10 +56,10 @@ int mm_support(void) · 1 unmodified line
6256 /* to the EFLAGS reg */
6357 "xor $0x200000, %0\n\t"
6458 "push %0\n\t"
65− POPF
59+ "popfl\n\t"
6660
6761 /* ... Get the (hopefully modified) EFLAGS */
68− PUSHF
62+ "pushfl\n\t"
6963 "pop %0\n\t"
7064 : "=a" (a), "=c" (c)
7165 :
@@ -74,6 +68,7 @@ int mm_support(void) · 2 unmodified lines
7468
7569 if (a == c)
7670 return 0; /* CPUID not supported */
71+#endif
7772
7873 cpuid(0, max_std_level, ebx, ecx, edx);
7974

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t