summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-06 16:06:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-06 16:24:27 +0200
commit32de28053d23fe70a1b99e143757494a4ef15d07 (patch)
tree433ebdb183e4e855c6a70694704c00f640843f57
parent63d7684fefcfa9de1a04b43471f876e882ba7aac (diff)
downloadffmpeg-streaming-32de28053d23fe70a1b99e143757494a4ef15d07.zip
ffmpeg-streaming-32de28053d23fe70a1b99e143757494a4ef15d07.tar.gz
avcodec/x86/cabac: factorize broken llvm/clang check out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/x86/cabac.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
index 1b7bcee..1c24dc3 100644
--- a/libavcodec/x86/cabac.h
+++ b/libavcodec/x86/cabac.h
@@ -27,6 +27,13 @@
#include "libavutil/internal.h"
#include "config.h"
+#if (defined(__i386) && defined(__clang__) && (__clang_major__<2 || (__clang_major__==2 && __clang_minor__<10)))\
+ || ( !defined(__clang__) && defined(__llvm__) && __GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__<=1)
+# define BROKEN_COMPILER 1
+#else
+# define BROKEN_COMPILER 0
+#endif
+
#if HAVE_INLINE_ASM
#ifdef BROKEN_RELOCATIONS
@@ -149,9 +156,7 @@
#endif /* BROKEN_RELOCATIONS */
-
-#if HAVE_7REGS && !(defined(__i386) && defined(__clang__) && (__clang_major__<2 || (__clang_major__==2 && __clang_minor__<10)))\
- && !( !defined(__clang__) && defined(__llvm__) && __GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__<=1)
+#if HAVE_7REGS && !BROKEN_COMPILER
#define get_cabac_inline get_cabac_inline_x86
static av_always_inline int get_cabac_inline_x86(CABACContext *c,
uint8_t *const state)
OpenPOWER on IntegriCloud