changeset 342:8635a7036395 libavcodec

* fixes problem with -funroll-loops and buggy gcc compiler
author kabi
date Wed, 24 Apr 2002 12:18:59 +0000
parents bf26081c373c
children 9211a0c9466a
files i386/dsputil_mmx.c
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/i386/dsputil_mmx.c	Wed Apr 24 01:24:06 2002 +0000
+++ b/i386/dsputil_mmx.c	Wed Apr 24 12:18:59 2002 +0000
@@ -229,12 +229,12 @@
     pix = pixels;
     MOVQ_ZERO(mm7);
     i = 4;
-    while (i) {
+    do {
 	__asm __volatile(
-		"movq	%2, %%mm0\n\t"
-		"movq	8%2, %%mm1\n\t"
-		"movq	16%2, %%mm2\n\t"
-		"movq	24%2, %%mm3\n\t"
+		"movq	(%2), %%mm0\n\t"
+		"movq	8(%2), %%mm1\n\t"
+		"movq	16(%2), %%mm2\n\t"
+		"movq	24(%2), %%mm3\n\t"
 		"movq	%0, %%mm4\n\t"
 		"movq	%1, %%mm6\n\t"
 		"movq	%%mm4, %%mm5\n\t"
@@ -252,12 +252,11 @@
 		"movq	%%mm0, %0\n\t"
 		"movq	%%mm2, %1\n\t"
 		:"+m"(*pix), "+m"(*(pix+line_size))
-		:"m"(*p)
+		:"r"(p)
 		:"memory");
         pix += line_size*2;
         p += 16;
-        i--;
-    };
+    } while (--i);
 }
 
 static void put_pixels_mmx(UINT8 *block, const UINT8 *pixels, int line_size, int h)