From f6fbce761ea697f437cef721ec6711ffcbd1ac1f Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 3 Oct 2012 17:57:53 +0200 Subject: x86: Drop CPU detection intrinsics Now that there is CPU detection in YASM, there will always be one of inline or external assembly enabled, which obviates the need to fall back on CPU detection through compiler intrinsics. --- libavutil/x86/cpu.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'libavutil/x86/cpu.c') diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c index fb1dd299bc..5b658d1bed 100644 --- a/libavutil/x86/cpu.c +++ b/libavutil/x86/cpu.c @@ -45,35 +45,9 @@ "xchg %%"REG_b", %%"REG_S \ : "=a" (eax), "=S" (ebx), "=c" (ecx), "=d" (edx) \ : "0" (index)) -#elif HAVE_CPUID -#include -#define cpuid(index, eax, ebx, ecx, edx) \ - do { \ - int info[4]; \ - __cpuid(info, index); \ - eax = info[0]; \ - ebx = info[1]; \ - ecx = info[2]; \ - edx = info[3]; \ - } while (0) -#endif /* HAVE_CPUID */ - -#if HAVE_INLINE_ASM #define xgetbv(index, eax, edx) \ __asm__ (".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c" (index)) -#elif HAVE_XGETBV -#include - -#define xgetbv(index, eax, edx) \ - do { \ - uint64_t res = __xgetbv(index); \ - eax = res; \ - edx = res >> 32; \ - } while (0) -#endif /* HAVE_XGETBV */ - -#if HAVE_INLINE_ASM #define get_eflags(x) \ __asm__ volatile ("pushfl \n" \ @@ -85,16 +59,6 @@ "popfl \n" \ :: "r"(x)) -#elif HAVE_RWEFLAGS - -#include - -#define get_eflags(x) \ - x = __readeflags() - -#define set_eflags(x) \ - __writeeflags(x) - #endif /* HAVE_INLINE_ASM */ #if ARCH_X86_64 -- cgit v1.2.3