comparison x86/dsputil_mmx_avg_template.c @ 10325:36b60aa6bc75 libavcodec

Replace several #ifdef PIC with the more obvious and correct #if !HAVE_EBX_AVAILABLE, since all it does is avoid using ebx.
author reimar
date Wed, 30 Sep 2009 09:49:12 +0000
parents 04423b2f6e0b
children 11c5a87497d3
comparison
equal deleted inserted replaced
10324:5bbe55451800 10325:36b60aa6bc75
94 "movd %%mm1, (%3) \n\t" 94 "movd %%mm1, (%3) \n\t"
95 "add %5, %3 \n\t" 95 "add %5, %3 \n\t"
96 "add $16, %2 \n\t" 96 "add $16, %2 \n\t"
97 "subl $4, %0 \n\t" 97 "subl $4, %0 \n\t"
98 "jnz 1b \n\t" 98 "jnz 1b \n\t"
99 #ifdef PIC //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used 99 #if !HAVE_EBX_AVAILABLE //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used
100 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 100 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
101 #else 101 #else
102 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 102 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
103 #endif 103 #endif
104 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride) 104 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
141 "movq %%mm1, (%3) \n\t" 141 "movq %%mm1, (%3) \n\t"
142 "add %5, %3 \n\t" 142 "add %5, %3 \n\t"
143 "add $32, %2 \n\t" 143 "add $32, %2 \n\t"
144 "subl $4, %0 \n\t" 144 "subl $4, %0 \n\t"
145 "jnz 1b \n\t" 145 "jnz 1b \n\t"
146 #ifdef PIC //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used 146 #if !HAVE_EBX_AVAILABLE //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used
147 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 147 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
148 #else 148 #else
149 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 149 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
150 #endif 150 #endif
151 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride) 151 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
211 "movq %%mm1, (%3) \n\t" 211 "movq %%mm1, (%3) \n\t"
212 "add %5, %3 \n\t" 212 "add %5, %3 \n\t"
213 "add $32, %2 \n\t" 213 "add $32, %2 \n\t"
214 "subl $4, %0 \n\t" 214 "subl $4, %0 \n\t"
215 "jnz 1b \n\t" 215 "jnz 1b \n\t"
216 #ifdef PIC //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used 216 #if !HAVE_EBX_AVAILABLE //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used
217 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 217 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
218 #else 218 #else
219 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 219 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
220 #endif 220 #endif
221 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride) 221 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
266 "movd %%mm1, (%3) \n\t" 266 "movd %%mm1, (%3) \n\t"
267 "add %5, %3 \n\t" 267 "add %5, %3 \n\t"
268 "add $16, %2 \n\t" 268 "add $16, %2 \n\t"
269 "subl $4, %0 \n\t" 269 "subl $4, %0 \n\t"
270 "jnz 1b \n\t" 270 "jnz 1b \n\t"
271 #ifdef PIC //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used 271 #if !HAVE_EBX_AVAILABLE //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used
272 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 272 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
273 #else 273 #else
274 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 274 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
275 #endif 275 #endif
276 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride) 276 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
318 "movq %%mm1, (%3) \n\t" 318 "movq %%mm1, (%3) \n\t"
319 "add %5, %3 \n\t" 319 "add %5, %3 \n\t"
320 "add $32, %2 \n\t" 320 "add $32, %2 \n\t"
321 "subl $4, %0 \n\t" 321 "subl $4, %0 \n\t"
322 "jnz 1b \n\t" 322 "jnz 1b \n\t"
323 #ifdef PIC //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used 323 #if !HAVE_EBX_AVAILABLE //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used
324 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 324 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
325 #else 325 #else
326 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 326 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
327 #endif 327 #endif
328 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride) 328 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
406 "movq %%mm1, 8(%3) \n\t" 406 "movq %%mm1, 8(%3) \n\t"
407 "add %5, %3 \n\t" 407 "add %5, %3 \n\t"
408 "add $32, %2 \n\t" 408 "add $32, %2 \n\t"
409 "subl $2, %0 \n\t" 409 "subl $2, %0 \n\t"
410 "jnz 1b \n\t" 410 "jnz 1b \n\t"
411 #ifdef PIC //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used 411 #if !HAVE_EBX_AVAILABLE //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used
412 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 412 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
413 #else 413 #else
414 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 414 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
415 #endif 415 #endif
416 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride) 416 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
460 "movq %%mm1, 8(%3) \n\t" 460 "movq %%mm1, 8(%3) \n\t"
461 "add %5, %3 \n\t" 461 "add %5, %3 \n\t"
462 "add $32, %2 \n\t" 462 "add $32, %2 \n\t"
463 "subl $2, %0 \n\t" 463 "subl $2, %0 \n\t"
464 "jnz 1b \n\t" 464 "jnz 1b \n\t"
465 #ifdef PIC //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used 465 #if !HAVE_EBX_AVAILABLE //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used
466 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 466 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
467 #else 467 #else
468 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 468 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
469 #endif 469 #endif
470 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride) 470 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
533 "movq %%mm1, 8(%3) \n\t" 533 "movq %%mm1, 8(%3) \n\t"
534 "add %5, %3 \n\t" 534 "add %5, %3 \n\t"
535 "add $32, %2 \n\t" 535 "add $32, %2 \n\t"
536 "subl $2, %0 \n\t" 536 "subl $2, %0 \n\t"
537 "jnz 1b \n\t" 537 "jnz 1b \n\t"
538 #ifdef PIC //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used 538 #if !HAVE_EBX_AVAILABLE //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cannot be used
539 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst) 539 :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
540 #else 540 #else
541 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst) 541 :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
542 #endif 542 #endif
543 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride) 543 :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)