changeset 966:7ef9226f430e libavcodec

more gcc bug workarounds
author michaelni
date Tue, 07 Jan 2003 11:59:34 +0000
parents e149203f4a0d
children 274b518c4ecb
files i386/dsputil_mmx.c i386/dsputil_mmx_rnd.h
diffstat 2 files changed, 15 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/i386/dsputil_mmx.c	Tue Jan 07 11:07:15 2003 +0000
+++ b/i386/dsputil_mmx.c	Tue Jan 07 11:59:34 2003 +0000
@@ -790,8 +790,9 @@
         "addl %4, %1			\n\t"\
         "decl %2			\n\t"\
         " jnz 1b				\n\t"\
-        : "+r"(src), "+r"(dst), "+g"(h)\
-        : "r"(srcStride), "r"(dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(temp), "m"(ROUNDER)\
+        : "+a"(src), "+b"(dst), "+c"(h)\
+        : "d"(srcStride), "S"(dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(temp), "m"(ROUNDER)\
+        : "memory"\
     );\
 }\
 \
@@ -835,6 +836,7 @@
             "packuswb %%mm1, %%mm0	\n\t"\
             OP_3DNOW(%%mm0, 8(%1), %%mm1, q)\
             :: "r"(temp), "r"(dst), "m"(ROUNDER)\
+            : "memory"\
         );\
         dst+=dstStride;\
         src+=srcStride;\
@@ -901,8 +903,9 @@
         "addl %4, %1			\n\t"\
         "decl %2			\n\t"\
         " jnz 1b			\n\t"\
-        : "+r"(src), "+r"(dst), "+r"(h)\
-        : "r"(srcStride), "r"(dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(temp), "m"(ROUNDER)\
+        : "+a"(src), "+b"(dst), "+c"(h)\
+        : "S"(srcStride), "D"(dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(temp), "m"(ROUNDER)\
+        : "memory"\
     );\
 }\
 \
@@ -930,6 +933,7 @@
             "packuswb %%mm1, %%mm0	\n\t"\
             OP_3DNOW(%%mm0, (%1), %%mm1, q)\
             :: "r"(temp), "r"(dst), "m"(ROUNDER)\
+            :"memory"\
         );\
         dst+=dstStride;\
         src+=srcStride;\
@@ -965,6 +969,7 @@
         " jnz 1b			\n\t"\
         : "+r" (src), "+r" (temp_ptr), "+r"(count)\
         : "r" (srcStride), "r"(2*8*17), "r"(3*8*17)\
+        : "memory"\
     );\
     \
     temp_ptr= temp;\
@@ -1011,6 +1016,7 @@
         \
         : "+r"(temp_ptr), "+r"(dst), "+r"(count)\
         : "r"(dstStride), "r"(2*dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER), "g"(4-14*dstStride)\
+        :"memory"\
     );\
 }\
 \
@@ -1035,6 +1041,7 @@
         " jnz 1b			\n\t"\
         : "+r" (src), "+r" (temp_ptr), "+r"(count)\
         : "r" (srcStride)\
+        : "memory"\
     );\
     \
     temp_ptr= temp;\
@@ -1069,7 +1076,8 @@
          \
         : "+r"(temp_ptr), "+r"(dst), "+g"(count)\
         : "r"(dstStride), "r"(2*dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER), "g"(4-6*dstStride)\
-    );\
+        : "memory"\
+   );\
 }\
 \
 static void OPNAME ## qpel8_mc00_ ## MMX (UINT8 *dst, UINT8 *src, int stride){\
--- a/i386/dsputil_mmx_rnd.h	Tue Jan 07 11:07:15 2003 +0000
+++ b/i386/dsputil_mmx_rnd.h	Tue Jan 07 11:59:34 2003 +0000
@@ -85,8 +85,8 @@
 	"addl	%5, %3			\n\t"
 	"subl	$4, %0			\n\t"
 	"jnz	1b			\n\t"
-	:"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
-	:"r"(src1Stride), "r"(dstStride)
+	:"+a"(h), "+b"(src1), "+c"(src2), "+d"(dst)
+	:"S"(src1Stride), "D"(dstStride)
 	:"memory");
 }