comparison x86/h264dsp_mmx.c @ 11701:953d0c2d2c0a libavcodec

Replace more "m" constraints with MANGLE to fix compilation issues with x86_32 gcc 4.4.4 and -fPIC.
author reimar
date Mon, 10 May 2010 21:16:08 +0000
parents 731050abce41
children afee30fe8c26
comparison
equal deleted inserted replaced
11700:6bdec2a0e7e1 11701:953d0c2d2c0a
1136 \ 1136 \
1137 static av_noinline void OPNAME ## h264_qpel8_h_lowpass_ ## MMX(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\ 1137 static av_noinline void OPNAME ## h264_qpel8_h_lowpass_ ## MMX(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
1138 int h=8;\ 1138 int h=8;\
1139 __asm__ volatile(\ 1139 __asm__ volatile(\
1140 "pxor %%mm7, %%mm7 \n\t"\ 1140 "pxor %%mm7, %%mm7 \n\t"\
1141 "movq %5, %%mm6 \n\t"\ 1141 "movq "MANGLE(ff_pw_5)", %%mm6\n\t"\
1142 "1: \n\t"\ 1142 "1: \n\t"\
1143 "movq (%0), %%mm0 \n\t"\ 1143 "movq (%0), %%mm0 \n\t"\
1144 "movq 1(%0), %%mm2 \n\t"\ 1144 "movq 1(%0), %%mm2 \n\t"\
1145 "movq %%mm0, %%mm1 \n\t"\ 1145 "movq %%mm0, %%mm1 \n\t"\
1146 "movq %%mm2, %%mm3 \n\t"\ 1146 "movq %%mm2, %%mm3 \n\t"\
1170 "movd 7(%0), %%mm5 \n\t"\ 1170 "movd 7(%0), %%mm5 \n\t"\
1171 "punpcklbw %%mm7, %%mm2 \n\t"\ 1171 "punpcklbw %%mm7, %%mm2 \n\t"\
1172 "punpcklbw %%mm7, %%mm5 \n\t"\ 1172 "punpcklbw %%mm7, %%mm5 \n\t"\
1173 "paddw %%mm3, %%mm2 \n\t"\ 1173 "paddw %%mm3, %%mm2 \n\t"\
1174 "paddw %%mm5, %%mm4 \n\t"\ 1174 "paddw %%mm5, %%mm4 \n\t"\
1175 "movq %6, %%mm5 \n\t"\ 1175 "movq "MANGLE(ff_pw_16)", %%mm5\n\t"\
1176 "paddw %%mm5, %%mm2 \n\t"\ 1176 "paddw %%mm5, %%mm2 \n\t"\
1177 "paddw %%mm5, %%mm4 \n\t"\ 1177 "paddw %%mm5, %%mm4 \n\t"\
1178 "paddw %%mm2, %%mm0 \n\t"\ 1178 "paddw %%mm2, %%mm0 \n\t"\
1179 "paddw %%mm4, %%mm1 \n\t"\ 1179 "paddw %%mm4, %%mm1 \n\t"\
1180 "psraw $5, %%mm0 \n\t"\ 1180 "psraw $5, %%mm0 \n\t"\
1184 "add %3, %0 \n\t"\ 1184 "add %3, %0 \n\t"\
1185 "add %4, %1 \n\t"\ 1185 "add %4, %1 \n\t"\
1186 "decl %2 \n\t"\ 1186 "decl %2 \n\t"\
1187 " jnz 1b \n\t"\ 1187 " jnz 1b \n\t"\
1188 : "+a"(src), "+c"(dst), "+g"(h)\ 1188 : "+a"(src), "+c"(dst), "+g"(h)\
1189 : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\ 1189 : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride)\
1190 : "memory"\ 1190 : "memory"\
1191 );\ 1191 );\
1192 }\ 1192 }\
1193 \ 1193 \
1194 static av_noinline void OPNAME ## h264_qpel8_h_lowpass_l2_ ## MMX(uint8_t *dst, uint8_t *src, uint8_t *src2, int dstStride, int src2Stride){\ 1194 static av_noinline void OPNAME ## h264_qpel8_h_lowpass_l2_ ## MMX(uint8_t *dst, uint8_t *src, uint8_t *src2, int dstStride, int src2Stride){\
1638 \ 1638 \
1639 static av_noinline void OPNAME ## h264_qpel8_h_lowpass_ ## MMX(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\ 1639 static av_noinline void OPNAME ## h264_qpel8_h_lowpass_ ## MMX(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
1640 int h=8;\ 1640 int h=8;\
1641 __asm__ volatile(\ 1641 __asm__ volatile(\
1642 "pxor %%xmm7, %%xmm7 \n\t"\ 1642 "pxor %%xmm7, %%xmm7 \n\t"\
1643 "movdqa %5, %%xmm6 \n\t"\ 1643 "movdqa "MANGLE(ff_pw_5)", %%xmm6\n\t"\
1644 "1: \n\t"\ 1644 "1: \n\t"\
1645 "lddqu -2(%0), %%xmm1 \n\t"\ 1645 "lddqu -2(%0), %%xmm1 \n\t"\
1646 "movdqa %%xmm1, %%xmm0 \n\t"\ 1646 "movdqa %%xmm1, %%xmm0 \n\t"\
1647 "punpckhbw %%xmm7, %%xmm1 \n\t"\ 1647 "punpckhbw %%xmm7, %%xmm1 \n\t"\
1648 "punpcklbw %%xmm7, %%xmm0 \n\t"\ 1648 "punpcklbw %%xmm7, %%xmm0 \n\t"\
1658 "paddw %%xmm5, %%xmm0 \n\t"\ 1658 "paddw %%xmm5, %%xmm0 \n\t"\
1659 "paddw %%xmm3, %%xmm2 \n\t"\ 1659 "paddw %%xmm3, %%xmm2 \n\t"\
1660 "paddw %%xmm4, %%xmm1 \n\t"\ 1660 "paddw %%xmm4, %%xmm1 \n\t"\
1661 "psllw $2, %%xmm2 \n\t"\ 1661 "psllw $2, %%xmm2 \n\t"\
1662 "psubw %%xmm1, %%xmm2 \n\t"\ 1662 "psubw %%xmm1, %%xmm2 \n\t"\
1663 "paddw %6, %%xmm0 \n\t"\ 1663 "paddw "MANGLE(ff_pw_16)", %%xmm0\n\t"\
1664 "pmullw %%xmm6, %%xmm2 \n\t"\ 1664 "pmullw %%xmm6, %%xmm2 \n\t"\
1665 "paddw %%xmm0, %%xmm2 \n\t"\ 1665 "paddw %%xmm0, %%xmm2 \n\t"\
1666 "psraw $5, %%xmm2 \n\t"\ 1666 "psraw $5, %%xmm2 \n\t"\
1667 "packuswb %%xmm2, %%xmm2 \n\t"\ 1667 "packuswb %%xmm2, %%xmm2 \n\t"\
1668 OP(%%xmm2, (%1), %%xmm4, q)\ 1668 OP(%%xmm2, (%1), %%xmm4, q)\
1669 "add %3, %0 \n\t"\ 1669 "add %3, %0 \n\t"\
1670 "add %4, %1 \n\t"\ 1670 "add %4, %1 \n\t"\
1671 "decl %2 \n\t"\ 1671 "decl %2 \n\t"\
1672 " jnz 1b \n\t"\ 1672 " jnz 1b \n\t"\
1673 : "+a"(src), "+c"(dst), "+g"(h)\ 1673 : "+a"(src), "+c"(dst), "+g"(h)\
1674 : "D"((x86_reg)srcStride), "S"((x86_reg)dstStride),\ 1674 : "D"((x86_reg)srcStride), "S"((x86_reg)dstStride)\
1675 "m"(ff_pw_5), "m"(ff_pw_16)\
1676 : "memory"\ 1675 : "memory"\
1677 );\ 1676 );\
1678 }\ 1677 }\
1679 static void OPNAME ## h264_qpel16_h_lowpass_ ## MMX(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\ 1678 static void OPNAME ## h264_qpel16_h_lowpass_ ## MMX(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
1680 OPNAME ## h264_qpel8_h_lowpass_ ## MMX(dst , src , dstStride, srcStride);\ 1679 OPNAME ## h264_qpel8_h_lowpass_ ## MMX(dst , src , dstStride, srcStride);\