Mercurial > libavcodec.hg
changeset 958:9bb668034ecf libavcodec
slowdown / gcc 2.95.* bug workaround (this should be reversed as soon as gcc 2.95.* support is droped)
author | michaelni |
---|---|
date | Sun, 05 Jan 2003 19:53:07 +0000 |
parents | 8a95bda80fdc |
children | 3ec070eef24a |
files | i386/dsputil_mmx.c |
diffstat | 1 files changed, 34 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/i386/dsputil_mmx.c Sun Jan 05 19:10:42 2003 +0000 +++ b/i386/dsputil_mmx.c Sun Jan 05 19:53:07 2003 +0000 @@ -677,6 +677,9 @@ uint64_t temp;\ \ asm volatile(\ + "pushl %0 \n\t"\ + "pushl %1 \n\t"\ + "pushl %2 \n\t"\ "pxor %%mm7, %%mm7 \n\t"\ "1: \n\t"\ "movq (%0), %%mm0 \n\t" /* ABCDEFGH */\ @@ -787,8 +790,11 @@ "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)\ + "popl %2 \n\t"\ + "popl %1 \n\t"\ + "popl %0 \n\t"\ + :: "r"(src), "r"(dst), "r"(h),\ + "r"(srcStride), "r"(dstStride), "m"(ff_pw_20), "m"(ff_pw_3), "m"(temp), "m"(ROUNDER)\ );\ }\ \ @@ -871,8 +877,12 @@ count=4;\ \ /*FIXME reorder for speed */\ +/*FIXME remove push/pop gcc 2.95 bug workaround here and in the other 3 lowpass filters */\ asm volatile(\ /*"pxor %%mm7, %%mm7 \n\t"*/\ + "pushl %0 \n\t"\ + "pushl %1 \n\t"\ + "pushl %2 \n\t"\ "1: \n\t"\ "movq (%0), %%mm0 \n\t"\ "movq 8(%0), %%mm1 \n\t"\ @@ -908,15 +918,21 @@ "addl %8, %1 \n\t"\ "decl %2 \n\t"\ " jnz 1b \n\t"\ - \ - : "+r"(temp_ptr), "+r"(dst), "+g"(count)\ - : "r"(dstStride), "r"(2*dstStride), "m"(ff_pw_20), "m"(ff_pw_3), "m"(ROUNDER), "g"(4-14*dstStride)\ + "popl %2 \n\t"\ + "popl %1 \n\t"\ + "popl %0 \n\t"\ + \ + :: "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)\ );\ }\ void OPNAME ## mpeg4_qpel8_h_lowpass_mmx2(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){\ uint64_t temp;\ \ asm volatile(\ + "pushl %0 \n\t"\ + "pushl %1 \n\t"\ + "pushl %2 \n\t"\ "pxor %%mm7, %%mm7 \n\t"\ "1: \n\t"\ "movq (%0), %%mm0 \n\t" /* ABCDEFGH */\ @@ -973,8 +989,11 @@ "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)\ + "popl %2 \n\t"\ + "popl %1 \n\t"\ + "popl %0 \n\t"\ + :: "r"(src), "r"(dst), "r"(h),\ + "r"(srcStride), "r"(dstStride), "m"(ff_pw_20), "m"(ff_pw_3), "m"(temp), "m"(ROUNDER)\ );\ }\ \ @@ -1036,6 +1055,9 @@ \ /*FIXME reorder for speed */\ asm volatile(\ + "pushl %0 \n\t"\ + "pushl %1 \n\t"\ + "pushl %2 \n\t"\ /*"pxor %%mm7, %%mm7 \n\t"*/\ "1: \n\t"\ "movq (%0), %%mm0 \n\t"\ @@ -1060,9 +1082,12 @@ "addl %8, %1 \n\t"\ "decl %2 \n\t"\ " jnz 1b \n\t"\ + "popl %2 \n\t"\ + "popl %1 \n\t"\ + "popl %0 \n\t"\ \ - : "+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)\ + :: "r"(temp_ptr), "r"(dst), "r"(count),\ + "r"(dstStride), "r"(2*dstStride), "m"(ff_pw_20), "m"(ff_pw_3), "m"(ROUNDER), "g"(4-6*dstStride)\ );\ }