diff options
author | Zdenek Kabelac <kabi@informatics.muni.cz> | 2002-04-24 12:18:59 +0000 |
---|---|---|
committer | Zdenek Kabelac <kabi@informatics.muni.cz> | 2002-04-24 12:18:59 +0000 |
commit | cd8e5f9637b42f0caafbb0ab470e3f133cb5f200 (patch) | |
tree | 40724a4942ab2c0868524fc881d4aa006993049e | |
parent | 1c2a8c7f14a5030367b7f7287667e380935cb706 (diff) | |
download | ffmpeg-cd8e5f9637b42f0caafbb0ab470e3f133cb5f200.tar.gz |
* fixes problem with -funroll-loops and buggy gcc compiler
Originally committed as revision 421 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/i386/dsputil_mmx.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c index da86eba480..8ec0cae412 100644 --- a/libavcodec/i386/dsputil_mmx.c +++ b/libavcodec/i386/dsputil_mmx.c @@ -229,12 +229,12 @@ static void add_pixels_clamped_mmx(const DCTELEM *block, UINT8 *pixels, int line 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 @@ static void add_pixels_clamped_mmx(const DCTELEM *block, UINT8 *pixels, int line "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) |