]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/x86/mathops.h
x86: hpeldsp: Use EXTERNAL_SSE2_FAST where appropriate
[ffmpeg] / libavcodec / x86 / mathops.h
index 32c88705e532754bbe7c35e64532dd9e51161277..2c04d9d1bd0117a3d02f4992e047c27185450d16 100644 (file)
@@ -23,7 +23,9 @@
 #define AVCODEC_X86_MATHOPS_H
 
 #include "config.h"
+
 #include "libavutil/common.h"
+#include "libavutil/x86/asm.h"
 
 #if HAVE_INLINE_ASM
 
@@ -74,7 +76,7 @@ static av_always_inline av_const int64_t MUL64(int a, int b)
 static inline av_const int mid_pred(int a, int b, int c)
 {
     int i=b;
-    __asm__ volatile(
+    __asm__ (
         "cmp    %2, %1 \n\t"
         "cmovg  %1, %0 \n\t"
         "cmovg  %2, %1 \n\t"
@@ -88,6 +90,7 @@ static inline av_const int mid_pred(int a, int b, int c)
     return i;
 }
 
+#if HAVE_6REGS
 #define COPY3_IF_LT(x, y, a, b, c, d)\
 __asm__ volatile(\
     "cmpl  %0, %3       \n\t"\
@@ -97,6 +100,8 @@ __asm__ volatile(\
     : "+&r" (x), "+&r" (a), "+r" (c)\
     : "r" (y), "r" (b), "r" (d)\
 );
+#endif /* HAVE_6REGS */
+
 #endif /* HAVE_I686 */
 
 #define MASK_ABS(mask, level)                   \