aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/x86
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-02-20 14:38:32 +0000
committerMans Rullgard <mans@mansr.com>2011-02-20 17:31:23 +0000
commitef6695387522fc783105ac187c84beaa284e7cff (patch)
tree65b41ceb9fe641b985fd679c554d3921dcd5d683 /libavutil/x86
parentd2bbf82e65e4a128ab1f0bf48df5d1e43c43c698 (diff)
downloadffmpeg-ef6695387522fc783105ac187c84beaa284e7cff.tar.gz
x86: use raw opcode for xgetbv instruction
This allows the CPU detection to work with assemblers not supporting the xgetbv mnemonic. These include clang and some BSD versions. All AVX code will be written for yasm, where the main assembler is not involved. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil/x86')
-rw-r--r--libavutil/x86/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index 2caac2fb23..14d0fe10c8 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -36,7 +36,7 @@
: "0" (index));
#define xgetbv(index,eax,edx) \
- __asm__ ("xgetbv" : "=a"(eax), "=d"(edx) : "c" (index))
+ __asm__ (".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c" (index))
/* Function to test if multimedia instructions are supported... */
int ff_get_cpu_flags_x86(void)