]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/x86/cabac.h
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / x86 / cabac.h
index a6ec22831dcff6e575b175b28c5a670c0364cacd..0c4419b4f3f8ea99f3bce379af7d6c586cd81893 100644 (file)
         "test   "lowword"   , "lowword"                                 \n\t"\
         " jnz   2f                                                      \n\t"\
         "mov    "byte"      , %%"REG_c"                                 \n\t"\
-        "cmp    "end"       , %%"REG_c"                                 \n\t"\
-        "jge    1f                                                      \n\t"\
         "add"OPSIZE" $2     , "byte"                                    \n\t"\
-        "1:                                                             \n\t"\
         "movzwl (%%"REG_c")     , "tmp"                                 \n\t"\
         "lea    -1("low")   , %%ecx                                     \n\t"\
         "xor    "low"       , %%ecx                                     \n\t"\
@@ -84,7 +81,9 @@
         "add    "tmp"       , "low"                                     \n\t"\
         "2:                                                             \n\t"
 
-#if HAVE_7REGS && !defined(BROKEN_RELOCATIONS)
+
+#if HAVE_7REGS && !defined(BROKEN_RELOCATIONS) && !(defined(__i386) && defined(__clang__) && (__clang_major__<2 || (__clang_major__==2 && __clang_minor__<10)))\
+                                               && !(defined(__i386) && !defined(__clang__) && defined(__llvm__) && __GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__<=1)
 #define get_cabac_inline get_cabac_inline_x86
 static av_always_inline int get_cabac_inline_x86(CABACContext *c,
                                                  uint8_t *const state)
@@ -127,10 +126,9 @@ static av_always_inline int get_cabac_bypass_sign_x86(CABACContext *c, int val)
         "movzwl         (%1), %%edx     \n\t"
         "bswap         %%edx            \n\t"
         "shrl            $15, %%edx     \n\t"
+        "add              $2, %1        \n\t"
         "addl          %%edx, %%eax     \n\t"
-        "cmp         %a5(%2), %1        \n\t"
-        "jge              1f            \n\t"
-        "add"OPSIZE"      $2, %a4(%2)   \n\t"
+        "mov              %1, %a4(%2)   \n\t"
         "1:                             \n\t"
         "movl          %%eax, %a3(%2)   \n\t"