Revision 40d0e665

View differences:

libavcodec/i386/cavsdsp_mmx.c
25 25
#include "dsputil.h"
26 26
#include "dsputil_mmx.h"
27 27
#include "common.h"
28
#include "x86_cpu.h"
28 29

  
29 30
/*****************************************************************************
30 31
 *
......
301 302
        VOP(%%mm1, %%mm2, %%mm3, %%mm4, %%mm5, %%mm0, OP)\
302 303
        \
303 304
        : "+a"(src), "+c"(dst)\
304
        : "S"((long)srcStride), "D"((long)dstStride), "m"(ADD), "m"(MUL1), "m"(MUL2)\
305
        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ADD), "m"(MUL1), "m"(MUL2)\
305 306
        : "memory"\
306 307
     );\
307 308
     if(h==16){\
......
316 317
            VOP(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, OP)\
317 318
            \
318 319
           : "+a"(src), "+c"(dst)\
319
           : "S"((long)srcStride), "D"((long)dstStride), "m"(ADD),  "m"(MUL1), "m"(MUL2)\
320
           : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ADD),  "m"(MUL1), "m"(MUL2)\
320 321
           : "memory"\
321 322
        );\
322 323
     }\
......
367 368
        "decl %2                    \n\t"\
368 369
        " jnz 1b                    \n\t"\
369 370
        : "+a"(src), "+c"(dst), "+m"(h)\
370
        : "d"((long)srcStride), "S"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_4)\
371
        : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_4)\
371 372
        : "memory"\
372 373
    );\
373 374
}\
libavcodec/i386/cpuid.c
42 42
    int rval = 0;
43 43
    int eax, ebx, ecx, edx;
44 44
    int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
45
    long a, c;
45
    x86_reg a, c;
46 46

  
47 47
    asm volatile (
48 48
        /* See if CPUID instruction is supported ... */
libavcodec/i386/dsputil_h264_template_mmx.c
249 249
        "sub $2, %2                 \n\t"
250 250
        "jnz 1b                     \n\t"
251 251
        : "+r"(dst), "+r"(src), "+r"(h)
252
        : "r"((long)stride), "m"(ff_pw_32), "m"(x), "m"(y)
252
        : "r"((x86_reg)stride), "m"(ff_pw_32), "m"(x), "m"(y)
253 253
    );
254 254
}
255 255

  
......
300 300
        "sub $1, %2\n\t"
301 301
        "jnz 1b\n\t"
302 302
        : "+r" (dst), "+r"(src), "+r"(h)
303
        : "m" (ff_pw_32), "r"((long)stride)
303
        : "m" (ff_pw_32), "r"((x86_reg)stride)
304 304
        : "%esi");
305 305

  
306 306
}
libavcodec/i386/dsputil_h264_template_ssse3.c
72 72
                "lea (%0,%3,2), %0 \n\t"
73 73
                "jg 1b \n\t"
74 74
                :"+r"(dst), "+r"(src), "+r"(h)
75
                :"r"((long)stride)
75
                :"r"((x86_reg)stride)
76 76
            );
77 77
        } else {
78 78
            asm volatile(
......
100 100
                "lea (%0,%3,2), %0 \n\t"
101 101
                "jg 1b \n\t"
102 102
                :"+r"(dst), "+r"(src), "+r"(h)
103
                :"r"((long)stride)
103
                :"r"((x86_reg)stride)
104 104
            );
105 105
        }
106 106
        return;
......
154 154
        "lea (%0,%3,2), %0 \n\t"
155 155
        "jg 1b \n\t"
156 156
        :"+r"(dst), "+r"(src), "+r"(h)
157
        :"r"((long)stride)
157
        :"r"((x86_reg)stride)
158 158
    );
159 159
}
160 160

  
......
202 202
        "lea (%0,%3,2), %0 \n\t"
203 203
        "jg 1b \n\t"
204 204
        :"+r"(dst), "+r"(src), "+r"(h)
205
        :"r"((long)stride)
205
        :"r"((x86_reg)stride)
206 206
    );
207 207
}
208 208

  
libavcodec/i386/dsputil_mmx.c
240 240
                "movq   %%mm2, (%0, %1)         \n\t"
241 241
                "movq   %%mm4, (%0, %1, 2)      \n\t"
242 242
                "movq   %%mm6, (%0, %2)         \n\t"
243
                ::"r" (pix), "r" ((long)line_size), "r" ((long)line_size*3), "m"(*p)
243
                ::"r" (pix), "r" ((x86_reg)line_size), "r" ((x86_reg)line_size*3), "m"(*p)
244 244
                :"memory");
245 245
        pix += line_size*4;
246 246
        p += 32;
......
265 265
            "movq       %%mm2, (%0, %1)         \n\t"
266 266
            "movq       %%mm4, (%0, %1, 2)      \n\t"
267 267
            "movq       %%mm6, (%0, %2)         \n\t"
268
            ::"r" (pix), "r" ((long)line_size), "r" ((long)line_size*3), "r"(p)
268
            ::"r" (pix), "r" ((x86_reg)line_size), "r" ((x86_reg)line_size*3), "r"(p)
269 269
            :"memory");
270 270
}
271 271

  
......
349 349
         "subl $4, %0                   \n\t"
350 350
         "jnz 1b                        \n\t"
351 351
         : "+g"(h), "+r" (pixels),  "+r" (block)
352
         : "r"((long)line_size)
352
         : "r"((x86_reg)line_size)
353 353
         : "%"REG_a, "memory"
354 354
        );
355 355
}
......
375 375
         "subl $4, %0                   \n\t"
376 376
         "jnz 1b                        \n\t"
377 377
         : "+g"(h), "+r" (pixels),  "+r" (block)
378
         : "r"((long)line_size)
378
         : "r"((x86_reg)line_size)
379 379
         : "%"REG_a, "memory"
380 380
        );
381 381
}
......
409 409
         "subl $4, %0                   \n\t"
410 410
         "jnz 1b                        \n\t"
411 411
         : "+g"(h), "+r" (pixels),  "+r" (block)
412
         : "r"((long)line_size)
412
         : "r"((x86_reg)line_size)
413 413
         : "%"REG_a, "memory"
414 414
        );
415 415
}
......
431 431
         "lea (%2,%3,4), %2             \n\t"
432 432
         "jnz 1b                        \n\t"
433 433
         : "+g"(h), "+r" (pixels),  "+r" (block)
434
         : "r"((long)line_size), "r"(3L*line_size)
434
         : "r"((x86_reg)line_size), "r"((x86_reg)3L*line_size)
435 435
         : "memory"
436 436
        );
437 437
}
......
457 457
         "lea (%2,%3,4), %2             \n\t"
458 458
         "jnz 1b                        \n\t"
459 459
         : "+g"(h), "+r" (pixels),  "+r" (block)
460
         : "r"((long)line_size), "r"(3L*line_size)
460
         : "r"((x86_reg)line_size), "r"((x86_reg)3L*line_size)
461 461
         : "memory"
462 462
        );
463 463
}
......
480 480
}
481 481

  
482 482
static void add_bytes_mmx(uint8_t *dst, uint8_t *src, int w){
483
    long i=0;
483
    x86_reg i=0;
484 484
    asm volatile(
485 485
        "1:                             \n\t"
486 486
        "movq  (%1, %0), %%mm0          \n\t"
......
495 495
        "cmp %3, %0                     \n\t"
496 496
        " jb 1b                         \n\t"
497 497
        : "+r" (i)
498
        : "r"(src), "r"(dst), "r"((long)w-15)
498
        : "r"(src), "r"(dst), "r"((x86_reg)w-15)
499 499
    );
500 500
    for(; i<w; i++)
501 501
        dst[i+0] += src[i+0];
502 502
}
503 503

  
504 504
static void add_bytes_l2_mmx(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
505
    long i=0;
505
    x86_reg i=0;
506 506
    asm volatile(
507 507
        "1:                             \n\t"
508 508
        "movq   (%2, %0), %%mm0         \n\t"
......
515 515
        "cmp %4, %0                     \n\t"
516 516
        " jb 1b                         \n\t"
517 517
        : "+r" (i)
518
        : "r"(dst), "r"(src1), "r"(src2), "r"((long)w-15)
518
        : "r"(dst), "r"(src1), "r"(src2), "r"((x86_reg)w-15)
519 519
    );
520 520
    for(; i<w; i++)
521 521
        dst[i] = src1[i] + src2[i];
......
689 689
        "movd %%mm6, (%1,%3)            \n\t"
690 690
        :: "r" (src),
691 691
           "r" (src + 4*stride),
692
           "r" ((long)   stride ),
693
           "r" ((long)(3*stride))
692
           "r" ((x86_reg)   stride ),
693
           "r" ((x86_reg)(3*stride))
694 694
    );
695 695
    }
696 696
}
......
723 723
                "cmp %3, %0                     \n\t"
724 724
                " jb 1b                         \n\t"
725 725
                : "+r" (ptr)
726
                : "r" ((long)wrap), "r" ((long)width), "r" (ptr + wrap*height)
726
                : "r" ((x86_reg)wrap), "r" ((x86_reg)width), "r" (ptr + wrap*height)
727 727
        );
728 728
    }
729 729
    else
......
746 746
                "cmp %3, %0                     \n\t"
747 747
                " jb 1b                         \n\t"
748 748
                : "+r" (ptr)
749
                : "r" ((long)wrap), "r" ((long)width), "r" (ptr + wrap*height)
749
                : "r" ((x86_reg)wrap), "r" ((x86_reg)width), "r" (ptr + wrap*height)
750 750
        );
751 751
    }
752 752

  
......
764 764
                "cmp %4, %0                     \n\t"
765 765
                " jb 1b                         \n\t"
766 766
                : "+r" (ptr)
767
                : "r" ((long)buf - (long)ptr - w), "r" ((long)-wrap), "r" ((long)-wrap*3), "r" (ptr+width+2*w)
767
                : "r" ((x86_reg)buf - (x86_reg)ptr - w), "r" ((x86_reg)-wrap), "r" ((x86_reg)-wrap*3), "r" (ptr+width+2*w)
768 768
        );
769 769
        ptr= last_line + (i + 1) * wrap - w;
770 770
        asm volatile(
......
778 778
                "cmp %4, %0                     \n\t"
779 779
                " jb 1b                         \n\t"
780 780
                : "+r" (ptr)
781
                : "r" ((long)last_line - (long)ptr - w), "r" ((long)wrap), "r" ((long)wrap*3), "r" (ptr+width+2*w)
781
                : "r" ((x86_reg)last_line - (x86_reg)ptr - w), "r" ((x86_reg)wrap), "r" ((x86_reg)wrap*3), "r" (ptr+width+2*w)
782 782
        );
783 783
    }
784 784
}
......
786 786
#define PAETH(cpu, abs3)\
787 787
void add_png_paeth_prediction_##cpu(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp)\
788 788
{\
789
    long i = -bpp;\
790
    long end = w-3;\
789
    x86_reg i = -bpp;\
790
    x86_reg end = w-3;\
791 791
    asm volatile(\
792 792
        "pxor      %%mm7, %%mm7 \n"\
793 793
        "movd    (%1,%0), %%mm0 \n"\
......
830 830
        "cmp       %5, %0 \n"\
831 831
        "jle 1b \n"\
832 832
        :"+r"(i)\
833
        :"r"(dst), "r"(top), "r"(src), "r"((long)bpp), "g"(end),\
833
        :"r"(dst), "r"(top), "r"(src), "r"((x86_reg)bpp), "g"(end),\
834 834
         "m"(ff_pw_255)\
835 835
        :"memory"\
836 836
    );\
......
994 994
        "decl %2                          \n\t"\
995 995
        " jnz 1b                          \n\t"\
996 996
        : "+a"(src), "+c"(dst), "+D"(h)\
997
        : "d"((long)srcStride), "S"((long)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(temp), "m"(ROUNDER)\
997
        : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(temp), "m"(ROUNDER)\
998 998
        : "memory"\
999 999
    );\
1000 1000
}\
......
1105 1105
        "decl %2                          \n\t"\
1106 1106
        " jnz 1b                          \n\t"\
1107 1107
        : "+a"(src), "+c"(dst), "+d"(h)\
1108
        : "S"((long)srcStride), "D"((long)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER)\
1108
        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER)\
1109 1109
        : "memory"\
1110 1110
    );\
1111 1111
}\
......
1169 1169
        "decl %2                        \n\t"\
1170 1170
        " jnz 1b                        \n\t"\
1171 1171
        : "+r" (src), "+r" (temp_ptr), "+r"(count)\
1172
        : "r" ((long)srcStride)\
1172
        : "r" ((x86_reg)srcStride)\
1173 1173
        : "memory"\
1174 1174
    );\
1175 1175
    \
......
1216 1216
        " jnz 1b                        \n\t"\
1217 1217
        \
1218 1218
        : "+r"(temp_ptr), "+r"(dst), "+g"(count)\
1219
        : "r"((long)dstStride), "r"(2*(long)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER), "g"(4-14*(long)dstStride)\
1219
        : "r"((x86_reg)dstStride), "r"(2*(x86_reg)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER), "g"(4-14*(x86_reg)dstStride)\
1220 1220
        :"memory"\
1221 1221
    );\
1222 1222
}\
......
1241 1241
        "decl %2                        \n\t"\
1242 1242
        " jnz 1b                        \n\t"\
1243 1243
        : "+r" (src), "+r" (temp_ptr), "+r"(count)\
1244
        : "r" ((long)srcStride)\
1244
        : "r" ((x86_reg)srcStride)\
1245 1245
        : "memory"\
1246 1246
    );\
1247 1247
    \
......
1276 1276
        " jnz 1b                        \n\t"\
1277 1277
         \
1278 1278
        : "+r"(temp_ptr), "+r"(dst), "+g"(count)\
1279
        : "r"((long)dstStride), "r"(2*(long)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER), "g"(4-6*(long)dstStride)\
1279
        : "r"((x86_reg)dstStride), "r"(2*(x86_reg)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER), "g"(4-6*(x86_reg)dstStride)\
1280 1280
        : "memory"\
1281 1281
   );\
1282 1282
}\
......
1839 1839
}
1840 1840

  
1841 1841
static void vector_fmul_3dnow(float *dst, const float *src, int len){
1842
    long i = (len-4)*4;
1842
    x86_reg i = (len-4)*4;
1843 1843
    asm volatile(
1844 1844
        "1: \n\t"
1845 1845
        "movq    (%1,%0), %%mm0 \n\t"
......
1857 1857
    );
1858 1858
}
1859 1859
static void vector_fmul_sse(float *dst, const float *src, int len){
1860
    long i = (len-8)*4;
1860
    x86_reg i = (len-8)*4;
1861 1861
    asm volatile(
1862 1862
        "1: \n\t"
1863 1863
        "movaps    (%1,%0), %%xmm0 \n\t"
......
1875 1875
}
1876 1876

  
1877 1877
static void vector_fmul_reverse_3dnow2(float *dst, const float *src0, const float *src1, int len){
1878
    long i = len*4-16;
1878
    x86_reg i = len*4-16;
1879 1879
    asm volatile(
1880 1880
        "1: \n\t"
1881 1881
        "pswapd   8(%1), %%mm0 \n\t"
......
1893 1893
    asm volatile("femms");
1894 1894
}
1895 1895
static void vector_fmul_reverse_sse(float *dst, const float *src0, const float *src1, int len){
1896
    long i = len*4-32;
1896
    x86_reg i = len*4-32;
1897 1897
    asm volatile(
1898 1898
        "1: \n\t"
1899 1899
        "movaps        16(%1), %%xmm0 \n\t"
......
1914 1914

  
1915 1915
static void vector_fmul_add_add_3dnow(float *dst, const float *src0, const float *src1,
1916 1916
                                      const float *src2, int src3, int len, int step){
1917
    long i = (len-4)*4;
1917
    x86_reg i = (len-4)*4;
1918 1918
    if(step == 2 && src3 == 0){
1919 1919
        dst += (len-4)*2;
1920 1920
        asm volatile(
......
1963 1963
}
1964 1964
static void vector_fmul_add_add_sse(float *dst, const float *src0, const float *src1,
1965 1965
                                    const float *src2, int src3, int len, int step){
1966
    long i = (len-8)*4;
1966
    x86_reg i = (len-8)*4;
1967 1967
    if(step == 2 && src3 == 0){
1968 1968
        dst += (len-8)*2;
1969 1969
        asm volatile(
libavcodec/i386/dsputil_mmx_avg.h
55 55
        "subl $4, %0                    \n\t"
56 56
        "jnz 1b                         \n\t"
57 57
        :"+g"(h), "+S"(pixels), "+D"(block)
58
        :"r" ((long)line_size)
58
        :"r" ((x86_reg)line_size)
59 59
        :"%"REG_a, "memory");
60 60
}
61 61

  
......
105 105
#else
106 106
        :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
107 107
#endif
108
        :"S"((long)src1Stride), "D"((long)dstStride)
108
        :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
109 109
        :"memory");
110 110
}
111 111

  
......
152 152
#else
153 153
        :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
154 154
#endif
155
        :"S"((long)src1Stride), "D"((long)dstStride)
155
        :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
156 156
        :"memory");
157 157
//the following should be used, though better not with gcc ...
158 158
/*        :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
......
222 222
#else
223 223
        :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
224 224
#endif
225
        :"S"((long)src1Stride), "D"((long)dstStride)
225
        :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
226 226
        :"memory");
227 227
//the following should be used, though better not with gcc ...
228 228
/*        :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
......
277 277
#else
278 278
        :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
279 279
#endif
280
        :"S"((long)src1Stride), "D"((long)dstStride)
280
        :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
281 281
        :"memory");
282 282
}
283 283

  
......
329 329
#else
330 330
        :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
331 331
#endif
332
        :"S"((long)src1Stride), "D"((long)dstStride)
332
        :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
333 333
        :"memory");
334 334
//the following should be used, though better not with gcc ...
335 335
/*        :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
......
373 373
        "subl $4, %0                    \n\t"
374 374
        "jnz 1b                         \n\t"
375 375
        :"+g"(h), "+S"(pixels), "+D"(block)
376
        :"r" ((long)line_size)
376
        :"r" ((x86_reg)line_size)
377 377
        :"%"REG_a, "memory");
378 378
}
379 379

  
......
417 417
#else
418 418
        :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
419 419
#endif
420
        :"S"((long)src1Stride), "D"((long)dstStride)
420
        :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
421 421
        :"memory");
422 422
//the following should be used, though better not with gcc ...
423 423
/*        :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
......
471 471
#else
472 472
        :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
473 473
#endif
474
        :"S"((long)src1Stride), "D"((long)dstStride)
474
        :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
475 475
        :"memory");
476 476
//the following should be used, though better not with gcc ...
477 477
/*        :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
......
544 544
#else
545 545
        :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
546 546
#endif
547
        :"S"((long)src1Stride), "D"((long)dstStride)
547
        :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
548 548
        :"memory");
549 549
//the following should be used, though better not with gcc ...
550 550
/*        :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
......
586 586
        "subl $4, %0                    \n\t"
587 587
        "jnz 1b                         \n\t"
588 588
        :"+g"(h), "+S"(pixels), "+D"(block)
589
        :"r" ((long)line_size)
589
        :"r" ((x86_reg)line_size)
590 590
        :"%"REG_a, "memory");
591 591
}
592 592

  
......
616 616
        "subl $4, %0                    \n\t"
617 617
        "jnz 1b                         \n\t"
618 618
        :"+g"(h), "+S"(pixels), "+D" (block)
619
        :"r" ((long)line_size)
619
        :"r" ((x86_reg)line_size)
620 620
        :"%"REG_a, "memory");
621 621
}
622 622

  
......
650 650
        "subl $4, %0                    \n\t"
651 651
        "jnz 1b                         \n\t"
652 652
        :"+g"(h), "+S"(pixels), "+D" (block)
653
        :"r" ((long)line_size)
653
        :"r" ((x86_reg)line_size)
654 654
        :"%"REG_a, "memory");
655 655
}
656 656

  
......
678 678
        "subl $4, %0                    \n\t"
679 679
        "jnz 1b                         \n\t"
680 680
        :"+g"(h), "+S"(pixels), "+D"(block)
681
        :"r" ((long)line_size)
681
        :"r" ((x86_reg)line_size)
682 682
        :"%"REG_a, "memory");
683 683
}
684 684

  
......
710 710
        "subl $4, %0                    \n\t"
711 711
        "jnz 1b                         \n\t"
712 712
        :"+g"(h), "+S"(pixels), "+D"(block)
713
        :"r" ((long)line_size)
713
        :"r" ((x86_reg)line_size)
714 714
        :"%"REG_a, "memory");
715 715
}
716 716

  
......
748 748
        "subl $4, %0                    \n\t"
749 749
        "jnz 1b                         \n\t"
750 750
        :"+g"(h), "+S"(pixels), "+D"(block)
751
        :"r" ((long)line_size)
751
        :"r" ((x86_reg)line_size)
752 752
        :"%"REG_a, "memory");
753 753
}
754 754

  
......
791 791
        "subl $4, %0                    \n\t"
792 792
        "jnz 1b                         \n\t"
793 793
        :"+g"(h), "+S"(pixels), "+D"(block)
794
        :"r" ((long)line_size)
794
        :"r" ((x86_reg)line_size)
795 795
        :"%"REG_a,  "memory");
796 796
}
797 797

  
......
812 812
            "movd %%mm2, (%1, %2, 2)        \n\t"
813 813
            "movd %%mm3, (%1, %3)           \n\t"
814 814
            ::"S"(pixels), "D"(block),
815
             "r" ((long)line_size), "r"(3L*line_size)
815
             "r" ((x86_reg)line_size), "r"((x86_reg)3L*line_size)
816 816
            :"memory");
817 817
        block += 4*line_size;
818 818
        pixels += 4*line_size;
......
868 868
        "decl  %0              \n\t"\
869 869
        "jnz   1b              \n\t"\
870 870
        :"+g"(h), "+r"(src)\
871
        :"r"((long)off1), "r"((long)off2),\
872
         "r"((long)(dst-src)), "r"((long)stride)\
871
        :"r"((x86_reg)off1), "r"((x86_reg)off2),\
872
         "r"((x86_reg)(dst-src)), "r"((x86_reg)stride)\
873 873
        :"memory"\
874 874
    );\
875 875
}\
......
885 885
        "decl  %0              \n\t"\
886 886
        "jnz   1b              \n\t"\
887 887
        :"+g"(h), "+r"(src)\
888
        :"r"((long)off1), "r"((long)off2),\
889
         "r"((long)(dst-src)), "r"((long)stride)\
888
        :"r"((x86_reg)off1), "r"((x86_reg)off2),\
889
         "r"((x86_reg)(dst-src)), "r"((x86_reg)stride)\
890 890
        :"memory"\
891 891
    );\
892 892
}
libavcodec/i386/dsputil_mmx_qns.h
30 30

  
31 31
static int DEF(try_8x8basis)(int16_t rem[64], int16_t weight[64], int16_t basis[64], int scale)
32 32
{
33
    long i=0;
33
    x86_reg i=0;
34 34

  
35 35
    assert(FFABS(scale) < MAX_ABS);
36 36
    scale<<= 16 + SCALE_OFFSET - BASIS_SHIFT + RECON_SHIFT;
......
72 72

  
73 73
static void DEF(add_8x8basis)(int16_t rem[64], int16_t basis[64], int scale)
74 74
{
75
    long i=0;
75
    x86_reg i=0;
76 76

  
77 77
    if(FFABS(scale) < MAX_ABS){
78 78
        scale<<= 16 + SCALE_OFFSET - BASIS_SHIFT + RECON_SHIFT;
libavcodec/i386/dsputil_mmx_rnd.h
57 57
        "subl   $4, %0                  \n\t"
58 58
        "jnz    1b                      \n\t"
59 59
        :"+g"(h), "+S"(pixels), "+D"(block)
60
        :"r"((long)line_size)
60
        :"r"((x86_reg)line_size)
61 61
        :REG_a, "memory");
62 62
}
63 63

  
......
107 107
#else
108 108
        :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
109 109
#endif
110
        :"S"((long)src1Stride), "D"((long)dstStride)
110
        :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
111 111
        :"memory");
112 112
}
113 113

  
......
153 153
        "subl   $4, %0                  \n\t"
154 154
        "jnz    1b                      \n\t"
155 155
        :"+g"(h), "+S"(pixels), "+D"(block)
156
        :"r"((long)line_size)
156
        :"r"((x86_reg)line_size)
157 157
        :REG_a, "memory");
158 158
}
159 159

  
......
202 202
#else
203 203
        :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
204 204
#endif
205
        :"S"((long)src1Stride), "D"((long)dstStride)
205
        :"S"((x86_reg)src1Stride), "D"((x86_reg)dstStride)
206 206
        :"memory");
207 207
}
208 208

  
......
231 231
        "subl   $4, %0                  \n\t"
232 232
        "jnz    1b                      \n\t"
233 233
        :"+g"(h), "+S"(pixels), "+D"(block)
234
        :"r"((long)line_size)
234
        :"r"((x86_reg)line_size)
235 235
        :REG_a, "memory");
236 236
}
237 237

  
......
297 297
        "subl   $2, %0                  \n\t"
298 298
        "jnz    1b                      \n\t"
299 299
        :"+g"(h), "+S"(pixels)
300
        :"D"(block), "r"((long)line_size)
300
        :"D"(block), "r"((x86_reg)line_size)
301 301
        :REG_a, "memory");
302 302
}
303 303

  
......
493 493
        "subl   $4, %0                  \n\t"
494 494
        "jnz    1b                      \n\t"
495 495
        :"+g"(h), "+S"(pixels), "+D"(block)
496
        :"r"((long)line_size)
496
        :"r"((x86_reg)line_size)
497 497
        :REG_a, "memory");
498 498
}
499 499

  
......
568 568
        "subl   $2, %0                  \n\t"
569 569
        "jnz    1b                      \n\t"
570 570
        :"+g"(h), "+S"(pixels)
571
        :"D"(block), "r"((long)line_size)
571
        :"D"(block), "r"((x86_reg)line_size)
572 572
        :REG_a, "memory");
573 573
}
574 574

  
libavcodec/i386/dsputilenc_mmx.c
51 51
        "add $32, %%"REG_a"             \n\t"
52 52
        "js 1b                          \n\t"
53 53
        : "+r" (pixels)
54
        : "r" (block+64), "r" ((long)line_size), "r" ((long)line_size*2)
54
        : "r" (block+64), "r" ((x86_reg)line_size), "r" ((x86_reg)line_size*2)
55 55
        : "%"REG_a
56 56
    );
57 57
}
......
80 80
        "add $16, %%"REG_a"             \n\t"
81 81
        "jnz 1b                         \n\t"
82 82
        : "+r" (s1), "+r" (s2)
83
        : "r" (block+64), "r" ((long)stride)
83
        : "r" (block+64), "r" ((x86_reg)stride)
84 84
        : "%"REG_a
85 85
    );
86 86
}
......
88 88
static int pix_sum16_mmx(uint8_t * pix, int line_size){
89 89
    const int h=16;
90 90
    int sum;
91
    long index= -line_size*h;
91
    x86_reg index= -line_size*h;
92 92

  
93 93
    asm volatile(
94 94
                "pxor %%mm7, %%mm7              \n\t"
......
117 117
                "movd %%mm6, %0                 \n\t"
118 118
                "andl $0xFFFF, %0               \n\t"
119 119
                : "=&r" (sum), "+r" (index)
120
                : "r" (pix - index), "r" ((long)line_size)
120
                : "r" (pix - index), "r" ((x86_reg)line_size)
121 121
        );
122 122

  
123 123
        return sum;
......
162 162
      "psrlq $32, %%mm7\n"      /* shift hi dword to lo */
163 163
      "paddd %%mm7,%%mm1\n"
164 164
      "movd %%mm1,%1\n"
165
      : "+r" (pix), "=r"(tmp) : "r" ((long)line_size) : "%ecx" );
165
      : "+r" (pix), "=r"(tmp) : "r" ((x86_reg)line_size) : "%ecx" );
166 166
    return tmp;
167 167
}
168 168

  
......
222 222
      "paddd %%mm7,%%mm1\n"
223 223
      "movd %%mm1,%2\n"
224 224
      : "+r" (pix1), "+r" (pix2), "=r"(tmp)
225
      : "r" ((long)line_size) , "m" (h)
225
      : "r" ((x86_reg)line_size) , "m" (h)
226 226
      : "%ecx");
227 227
    return tmp;
228 228
}
......
282 282
      "paddd %%mm7,%%mm1\n"
283 283
      "movd %%mm1,%2\n"
284 284
      : "+r" (pix1), "+r" (pix2), "=r"(tmp)
285
      : "r" ((long)line_size) , "m" (h)
285
      : "r" ((x86_reg)line_size) , "m" (h)
286 286
      : "%ecx");
287 287
    return tmp;
288 288
}
......
345 345
      "paddd %%xmm1,%%xmm7\n"
346 346
      "movd %%xmm7,%3\n"
347 347
      : "+r" (pix1), "+r" (pix2), "+r"(h), "=r"(tmp)
348
      : "r" ((long)line_size));
348
      : "r" ((x86_reg)line_size));
349 349
    return tmp;
350 350
}
351 351

  
......
469 469
      "paddd %%mm6,%%mm0\n"
470 470
      "movd %%mm0,%1\n"
471 471
      : "+r" (pix1), "=r"(tmp)
472
      : "r" ((long)line_size) , "g" (h-2)
472
      : "r" ((x86_reg)line_size) , "g" (h-2)
473 473
      : "%ecx");
474 474
      return tmp;
475 475
}
......
583 583
      "paddd %%mm6,%%mm0\n"
584 584
      "movd %%mm0,%1\n"
585 585
      : "+r" (pix1), "=r"(tmp)
586
      : "r" ((long)line_size) , "g" (h-2)
586
      : "r" ((x86_reg)line_size) , "g" (h-2)
587 587
      : "%ecx");
588 588
      return tmp + hf_noise8_mmx(pix+8, line_size, h);
589 589
}
......
665 665
      "paddw %%mm6,%%mm0\n"
666 666
      "movd %%mm0,%1\n"
667 667
      : "+r" (pix), "=r"(tmp)
668
      : "r" ((long)line_size) , "m" (h)
668
      : "r" ((x86_reg)line_size) , "m" (h)
669 669
      : "%ecx");
670 670
    return tmp & 0xFFFF;
671 671
}
......
706 706

  
707 707
      "movd %%mm6,%1\n"
708 708
      : "+r" (pix), "=r"(tmp)
709
      : "r" ((long)line_size) , "m" (h)
709
      : "r" ((x86_reg)line_size) , "m" (h)
710 710
      : "%ecx");
711 711
    return tmp;
712 712
}
......
785 785
      "paddw %%mm6,%%mm0\n"
786 786
      "movd %%mm0,%2\n"
787 787
      : "+r" (pix1), "+r" (pix2), "=r"(tmp)
788
      : "r" ((long)line_size) , "m" (h)
788
      : "r" ((x86_reg)line_size) , "m" (h)
789 789
      : "%ecx");
790 790
    return tmp & 0x7FFF;
791 791
}
......
843 843

  
844 844
      "movd %%mm6,%2\n"
845 845
      : "+r" (pix1), "+r" (pix2), "=r"(tmp)
846
      : "r" ((long)line_size) , "m" (h)
846
      : "r" ((x86_reg)line_size) , "m" (h)
847 847
      : "%ecx");
848 848
    return tmp;
849 849
}
850 850
#undef SUM
851 851

  
852 852
static void diff_bytes_mmx(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
853
    long i=0;
853
    x86_reg i=0;
854 854
    asm volatile(
855 855
        "1:                             \n\t"
856 856
        "movq  (%2, %0), %%mm0          \n\t"
......
865 865
        "cmp %4, %0                     \n\t"
866 866
        " jb 1b                         \n\t"
867 867
        : "+r" (i)
868
        : "r"(src1), "r"(src2), "r"(dst), "r"((long)w-15)
868
        : "r"(src1), "r"(src2), "r"(dst), "r"((x86_reg)w-15)
869 869
    );
870 870
    for(; i<w; i++)
871 871
        dst[i+0] = src1[i+0]-src2[i+0];
872 872
}
873 873

  
874 874
static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w, int *left, int *left_top){
875
    long i=0;
875
    x86_reg i=0;
876 876
    uint8_t l, lt;
877 877

  
878 878
    asm volatile(
......
895 895
        "cmp %4, %0                     \n\t"
896 896
        " jb 1b                         \n\t"
897 897
        : "+r" (i)
898
        : "r"(src1), "r"(src2), "r"(dst), "r"((long)w)
898
        : "r"(src1), "r"(src2), "r"(dst), "r"((x86_reg)w)
899 899
    );
900 900

  
901 901
    l= *left;
......
930 930
        DIFF_PIXELS_1(m0, mm##7, mm##0, (%1,%3,4), (%2,%3,4))\
931 931
        "mov"#m1" %0, "#mm"0          \n\t"\
932 932
        : "+m"(temp), "+r"(p1b), "+r"(p2b)\
933
        : "r"((long)stride), "r"((long)stride*3)\
933
        : "r"((x86_reg)stride), "r"((x86_reg)stride*3)\
934 934
    );\
935 935
}
936 936
    //the "+m"(temp) is needed as gcc 2.95 sometimes fails to compile "=m"(temp)
......
1237 1237

  
1238 1238
static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int size){
1239 1239
    int sum;
1240
    long i=size;
1240
    x86_reg i=size;
1241 1241
    asm volatile(
1242 1242
        "pxor %%mm4, %%mm4 \n"
1243 1243
        "1: \n"
libavcodec/i386/fft_3dn.c
20 20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 21
 */
22 22
#include "dsputil.h"
23
#include "x86_cpu.h"
23 24

  
24 25
static const int p1m1[2] __attribute__((aligned(8))) =
25 26
    { 0, 1 << 31 };
......
30 31
void ff_fft_calc_3dn(FFTContext *s, FFTComplex *z)
31 32
{
32 33
    int ln = s->nbits;
33
    long i, j;
34
    long j;
35
    x86_reg i;
34 36
    long nblocks, nloops;
35 37
    FFTComplex *p, *cptr;
36 38

  
libavcodec/i386/fft_3dn2.c
20 20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 21
 */
22 22
#include "dsputil.h"
23
#include "x86_cpu.h"
23 24

  
24 25
static const int p1m1[2] __attribute__((aligned(8))) =
25 26
    { 0, 1 << 31 };
......
30 31
void ff_fft_calc_3dn2(FFTContext *s, FFTComplex *z)
31 32
{
32 33
    int ln = s->nbits;
33
    long i, j;
34
    long j;
35
    x86_reg i;
34 36
    long nblocks, nloops;
35 37
    FFTComplex *p, *cptr;
36 38

  
......
124 126
void ff_imdct_calc_3dn2(MDCTContext *s, FFTSample *output,
125 127
                        const FFTSample *input, FFTSample *tmp)
126 128
{
127
    long k, n8, n4, n2, n;
129
    long n8, n4, n2, n;
130
    x86_reg k;
128 131
    const uint16_t *revtab = s->fft.revtab;
129 132
    const FFTSample *tcos = s->tcos;
130 133
    const FFTSample *tsin = s->tsin;
libavcodec/i386/fft_sse.c
19 19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
 */
21 21
#include "dsputil.h"
22
#include "x86_cpu.h"
22 23

  
23 24
static const int p1p1p1m1[4] __attribute__((aligned(16))) =
24 25
    { 0, 0, 0, 1 << 31 };
......
48 49
void ff_fft_calc_sse(FFTContext *s, FFTComplex *z)
49 50
{
50 51
    int ln = s->nbits;
51
    long i, j;
52
    x86_reg i;
53
    long j;
52 54
    long nblocks, nloops;
53 55
    FFTComplex *p, *cptr;
54 56

  
......
142 144
void ff_imdct_calc_sse(MDCTContext *s, FFTSample *output,
143 145
                       const FFTSample *input, FFTSample *tmp)
144 146
{
145
    long k, n8, n4, n2, n;
147
    x86_reg k;
148
    long n8, n4, n2, n;
146 149
    const uint16_t *revtab = s->fft.revtab;
147 150
    const FFTSample *tcos = s->tcos;
148 151
    const FFTSample *tsin = s->tsin;
libavcodec/i386/flacdsp_mmx.c
20 20
 */
21 21

  
22 22
#include "dsputil_mmx.h"
23
#include "x86_cpu.h"
23 24

  
24 25
static void apply_welch_window_sse2(const int32_t *data, int len, double *w_data)
25 26
{
26 27
    double c = 2.0 / (len-1.0);
27 28
    int n2 = len>>1;
28
    long i = -n2*sizeof(int32_t);
29
    long j =  n2*sizeof(int32_t);
29
    x86_reg i = -n2*sizeof(int32_t);
30
    x86_reg j =  n2*sizeof(int32_t);
30 31
    asm volatile(
31 32
        "movsd   %0,     %%xmm7 \n\t"
32 33
        "movapd  %1,     %%xmm6 \n\t"
......
71 72
    double *data1 = tmp + lag;
72 73
    int j;
73 74

  
74
    if((long)data1 & 15)
75
    if((x86_reg)data1 & 15)
75 76
        data1++;
76 77

  
77 78
    apply_welch_window_sse2(data, len, data1);
......
81 82
    data1[len] = 0.0;
82 83

  
83 84
    for(j=0; j<lag; j+=2){
84
        long i = -len*sizeof(double);
85
        x86_reg i = -len*sizeof(double);
85 86
        if(j == lag-2) {
86 87
            asm volatile(
87 88
                "movsd     %6,     %%xmm0 \n\t"
libavcodec/i386/h264_i386.h
96 96
                                       int *index, const uint8_t *sig_off){
97 97
    int minusindex= 4-(int)index;
98 98
    int coeff_count;
99
    long last=0;
99
    x86_reg last=0;
100 100
    asm volatile(
101 101
        "movl "RANGE    "(%3), %%esi            \n\t"
102 102
        "movl "LOW      "(%3), %%ebx            \n\t"
libavcodec/i386/h264dsp_mmx.c
86 86
        "add %1, %0             \n\t"
87 87
    STORE_DIFF_4P( %%mm4, %%mm1, %%mm7)
88 88
        : "+r"(dst)
89
        : "r" ((long)stride)
89
        : "r" ((x86_reg)stride)
90 90
    );
91 91
}
92 92

  
......
294 294
        STORE_DIFF_8P(%%xmm0, (%0,%2,2), %%xmm6, %%xmm7)
295 295
        STORE_DIFF_8P(%%xmm1, (%0,%3),   %%xmm6, %%xmm7)
296 296
        :"+r"(dst)
297
        :"r"(block), "r"((long)stride), "r"(3L*stride), "m"(ff_pw_32)
297
        :"r"(block), "r"((x86_reg)stride), "r"((x86_reg)3L*stride), "m"(ff_pw_32)
298 298
    );
299 299
}
300 300

  
......
503 503
        "movq      %%mm2, (%2)      \n\t"
504 504

  
505 505
        : "=m"(*tmp0)
506
        : "r"(pix-3*stride), "r"(pix), "r"((long)stride),
506
        : "r"(pix-3*stride), "r"(pix), "r"((x86_reg)stride),
507 507
          "m"(*tmp0/*unused*/), "m"(*(uint32_t*)tc0), "m"(alpha1), "m"(beta1),
508 508
          "m"(ff_bone)
509 509
    );
......
550 550
        "movq      %%mm1, (%0,%2)   \n\t"
551 551
        "movq      %%mm2, (%1)      \n\t"
552 552

  
553
        :: "r"(pix-2*stride), "r"(pix), "r"((long)stride),
553
        :: "r"(pix-2*stride), "r"(pix), "r"((x86_reg)stride),
554 554
           "r"(*(uint32_t*)tc0),
555 555
           "m"(alpha1), "m"(beta1), "m"(ff_bone), "m"(ff_pb_3F)
556 556
    );
......
601 601
        "paddb   %%mm6,   %%mm2     \n\t"
602 602
        "movq    %%mm1,   (%0,%2)   \n\t"
603 603
        "movq    %%mm2,   (%1)      \n\t"
604
        :: "r"(pix-2*stride), "r"(pix), "r"((long)stride),
604
        :: "r"(pix-2*stride), "r"(pix), "r"((x86_reg)stride),
605 605
           "m"(alpha1), "m"(beta1), "m"(ff_bone)
606 606
    );
607 607
}
......
797 797
        "decl %2                    \n\t"\
798 798
        " jnz 1b                    \n\t"\
799 799
        : "+a"(src), "+c"(dst), "+g"(h)\
800
        : "d"((long)srcStride), "S"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
800
        : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
801 801
        : "memory"\
802 802
    );\
803 803
}\
......
840 840
        "add %4, %1                 \n\t"\
841 841
        "add %3, %2                 \n\t"\
842 842
        : "+a"(src), "+c"(dst), "+d"(src2)\
843
        : "D"((long)src2Stride), "S"((long)dstStride)\
843
        : "D"((x86_reg)src2Stride), "S"((x86_reg)dstStride)\
844 844
        : "memory"\
845 845
    );\
846 846
    }while(--h);\
......
870 870
        QPEL_H264V(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, OP)\
871 871
         \
872 872
        : "+a"(src), "+c"(dst)\
873
        : "S"((long)srcStride), "D"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
873
        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
874 874
        : "memory"\
875 875
    );\
876 876
}\
......
902 902
            QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 3*8*3)\
903 903
             \
904 904
            : "+a"(src)\
905
            : "c"(tmp), "S"((long)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
905
            : "c"(tmp), "S"((x86_reg)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
906 906
            : "memory"\
907 907
        );\
908 908
        tmp += 4;\
......
931 931
        "decl %2                    \n\t"\
932 932
        " jnz 1b                    \n\t"\
933 933
        : "+a"(tmp), "+c"(dst), "+g"(h)\
934
        : "S"((long)dstStride)\
934
        : "S"((x86_reg)dstStride)\
935 935
        : "memory"\
936 936
    );\
937 937
}\
......
988 988
        "decl %2                    \n\t"\
989 989
        " jnz 1b                    \n\t"\
990 990
        : "+a"(src), "+c"(dst), "+g"(h)\
991
        : "d"((long)srcStride), "S"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
991
        : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
992 992
        : "memory"\
993 993
    );\
994 994
}\
......
1049 1049
        "add %4, %1                 \n\t"\
1050 1050
        "add %3, %2                 \n\t"\
1051 1051
        : "+a"(src), "+c"(dst), "+d"(src2)\
1052
        : "D"((long)src2Stride), "S"((long)dstStride),\
1052
        : "D"((x86_reg)src2Stride), "S"((x86_reg)dstStride),\
1053 1053
          "m"(ff_pw_16)\
1054 1054
        : "memory"\
1055 1055
    );\
......
1088 1088
        QPEL_H264V(%%mm1, %%mm2, %%mm3, %%mm4, %%mm5, %%mm0, OP)\
1089 1089
         \
1090 1090
        : "+a"(src), "+c"(dst)\
1091
        : "S"((long)srcStride), "D"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1091
        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1092 1092
        : "memory"\
1093 1093
     );\
1094 1094
     if(h==16){\
......
1103 1103
            QPEL_H264V(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, OP)\
1104 1104
            \
1105 1105
           : "+a"(src), "+c"(dst)\
1106
           : "S"((long)srcStride), "D"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1106
           : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1107 1107
           : "memory"\
1108 1108
        );\
1109 1109
     }\
......
1141 1141
            QPEL_H264HV(%%mm0, %%mm1, %%mm2, %%mm3, %%mm4, %%mm5, 6*48)\
1142 1142
            QPEL_H264HV(%%mm1, %%mm2, %%mm3, %%mm4, %%mm5, %%mm0, 7*48)\
1143 1143
            : "+a"(src)\
1144
            : "c"(tmp), "S"((long)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1144
            : "c"(tmp), "S"((x86_reg)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1145 1145
            : "memory"\
1146 1146
        );\
1147 1147
        if(size==16){\
......
1155 1155
                QPEL_H264HV(%%mm2, %%mm3, %%mm4, %%mm5, %%mm0, %%mm1, 14*48)\
1156 1156
                QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\
1157 1157
                : "+a"(src)\
1158
                : "c"(tmp), "S"((long)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1158
                : "c"(tmp), "S"((x86_reg)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1159 1159
                : "memory"\
1160 1160
            );\
1161 1161
        }\
......
1202 1202
        "decl %2                    \n\t"\
1203 1203
        " jnz 1b                    \n\t"\
1204 1204
        : "+a"(tmp), "+c"(dst), "+g"(h)\
1205
        : "S"((long)dstStride)\
1205
        : "S"((x86_reg)dstStride)\
1206 1206
        : "memory"\
1207 1207
    );\
1208 1208
    tmp += 8 - size*24;\
......
1275 1275
        OP(%%mm0, (%2),    %%mm4, d)\
1276 1276
        OP(%%mm1, (%2,%4), %%mm5, d)\
1277 1277
        :"+a"(src8), "+c"(src16), "+d"(dst)\
1278
        :"S"((long)src8Stride), "D"((long)dstStride)\
1278
        :"S"((x86_reg)src8Stride), "D"((x86_reg)dstStride)\
1279 1279
        :"memory");\
1280 1280
}\
1281 1281
static av_noinline void OPNAME ## pixels8_l2_shift5_ ## MMX(uint8_t *dst, int16_t *src16, uint8_t *src8, int dstStride, int src8Stride, int h)\
......
1297 1297
        OP(%%mm0, (%2), %%mm5, q)\
1298 1298
        OP(%%mm2, (%2,%4), %%mm5, q)\
1299 1299
        ::"a"(src8), "c"(src16), "d"(dst),\
1300
          "r"((long)src8Stride), "r"((long)dstStride)\
1300
          "r"((x86_reg)src8Stride), "r"((x86_reg)dstStride)\
1301 1301
        :"memory");\
1302 1302
        src8 += 2L*src8Stride;\
1303 1303
        src16 += 48;\
......
1372 1372
        "decl %3                    \n\t"\
1373 1373
        "jg 1b                      \n\t"\
1374 1374
        : "+a"(src), "+c"(dst), "+d"(src2), "+g"(h)\
1375
        : "D"((long)src2Stride), "S"((long)dstStride),\
1375
        : "D"((x86_reg)src2Stride), "S"((x86_reg)dstStride),\
1376 1376
          "m"(ff_pw_5), "m"(ff_pw_16)\
1377 1377
        : "memory"\
1378 1378
    );\
......
1430 1430
        "add %4, %1                 \n\t"\
1431 1431
        "add %3, %2                 \n\t"\
1432 1432
        : "+a"(src), "+c"(dst), "+d"(src2)\
1433
        : "D"((long)src2Stride), "S"((long)dstStride),\
1433
        : "D"((x86_reg)src2Stride), "S"((x86_reg)dstStride),\
1434 1434
          "m"(ff_pw_16)\
1435 1435
        : "memory"\
1436 1436
    );\
......
1473 1473
        "decl %2                    \n\t"\
1474 1474
        " jnz 1b                    \n\t"\
1475 1475
        : "+a"(src), "+c"(dst), "+g"(h)\
1476
        : "D"((long)srcStride), "S"((long)dstStride),\
1476
        : "D"((x86_reg)srcStride), "S"((x86_reg)dstStride),\
1477 1477
          "m"(ff_pw_5), "m"(ff_pw_16)\
1478 1478
        : "memory"\
1479 1479
    );\
......
1518 1518
        QPEL_H264V_XMM(%%xmm1, %%xmm2, %%xmm3, %%xmm4, %%xmm5, %%xmm0, OP)\
1519 1519
         \
1520 1520
        : "+a"(src), "+c"(dst)\
1521
        : "S"((long)srcStride), "D"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1521
        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1522 1522
        : "memory"\
1523 1523
    );\
1524 1524
    if(h==16){\
......
1533 1533
            QPEL_H264V_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, OP)\
1534 1534
            \
1535 1535
            : "+a"(src), "+c"(dst)\
1536
            : "S"((long)srcStride), "D"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1536
            : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1537 1537
            : "memory"\
1538 1538
        );\
1539 1539
    }\
......
1576 1576
            QPEL_H264HV_XMM(%%xmm0, %%xmm1, %%xmm2, %%xmm3, %%xmm4, %%xmm5, 6*48)
1577 1577
            QPEL_H264HV_XMM(%%xmm1, %%xmm2, %%xmm3, %%xmm4, %%xmm5, %%xmm0, 7*48)
1578 1578
            : "+a"(src)
1579
            : "c"(tmp), "S"((long)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)
1579
            : "c"(tmp), "S"((x86_reg)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)
1580 1580
            : "memory"
1581 1581
        );
1582 1582
        if(size==16){
......
1590 1590
                QPEL_H264HV_XMM(%%xmm2, %%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, 14*48)
1591 1591
                QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48)
1592 1592
                : "+a"(src)
1593
                : "c"(tmp), "S"((long)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)
1593
                : "c"(tmp), "S"((x86_reg)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)
1594 1594
                : "memory"
1595 1595
            );
1596 1596
        }
......
1654 1654
            "decl %2                    \n\t"\
1655 1655
            " jnz 1b                    \n\t"\
1656 1656
            : "+a"(tmp), "+c"(dst), "+g"(h)\
1657
            : "S"((long)dstStride)\
1657
            : "S"((x86_reg)dstStride)\
1658 1658
            : "memory"\
1659 1659
        );\
1660 1660
    }else{\
......
1688 1688
            "decl %2                    \n\t"\
1689 1689
            " jnz 1b                    \n\t"\
1690 1690
            : "+a"(tmp), "+c"(dst), "+g"(h)\
1691
            : "S"((long)dstStride)\
1691
            : "S"((x86_reg)dstStride)\
1692 1692
            : "memory"\
1693 1693
        );\
1694 1694
    }\
libavcodec/i386/motion_est_mmx.c
34 34

  
35 35
static inline void sad8_1_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
36 36
{
37
    long len= -(stride*h);
37
    x86_reg len= -(stride*h);
38 38
    asm volatile(
39 39
        ASMALIGN(4)
40 40
        "1:                             \n\t"
......
64 64
        "add %3, %%"REG_a"              \n\t"
65 65
        " js 1b                         \n\t"
66 66
        : "+a" (len)
67
        : "r" (blk1 - len), "r" (blk2 - len), "r" ((long)stride)
67
        : "r" (blk1 - len), "r" (blk2 - len), "r" ((x86_reg)stride)
68 68
    );
69 69
}
70 70

  
......
84 84
        "sub $2, %0                     \n\t"
85 85
        " jg 1b                         \n\t"
86 86
        : "+r" (h), "+r" (blk1), "+r" (blk2)
87
        : "r" ((long)stride)
87
        : "r" ((x86_reg)stride)
88 88
    );
89 89
}
90 90

  
......
106 106
        "sub $2, %0                     \n\t"
107 107
        " jg 1b                         \n\t"
108 108
        : "+r" (h), "+r" (blk1), "+r" (blk2)
109
        : "r" ((long)stride)
109
        : "r" ((x86_reg)stride)
110 110
    );
111 111
    asm volatile(
112 112
        "movhlps %%xmm6, %%xmm0         \n\t"
......
135 135
        "sub $2, %0                     \n\t"
136 136
        " jg 1b                         \n\t"
137 137
        : "+r" (h), "+r" (blk1), "+r" (blk2)
138
        : "r" ((long)stride)
138
        : "r" ((x86_reg)stride)
139 139
    );
140 140
}
141 141

  
......
160 160
        "sub $2, %0                     \n\t"
161 161
        " jg 1b                         \n\t"
162 162
        : "+r" (h), "+r" (blk1), "+r" (blk2)
163
        : "r" ((long)stride)
163
        : "r" ((x86_reg)stride)
164 164
    );
165 165
}
166 166

  
......
190 190
        "sub $2, %0                     \n\t"
191 191
        " jg 1b                         \n\t"
192 192
        : "+r" (h), "+r" (blk1), "+r" (blk2)
193
        : "r" ((long)stride)
193
        : "r" ((x86_reg)stride)
194 194
    );
195 195
}
196 196

  
197 197
static inline void sad8_2_mmx(uint8_t *blk1a, uint8_t *blk1b, uint8_t *blk2, int stride, int h)
198 198
{
199
    long len= -(stride*h);
199
    x86_reg len= -(stride*h);
200 200
    asm volatile(
201 201
        ASMALIGN(4)
202 202
        "1:                             \n\t"
......
228 228
        "add %4, %%"REG_a"              \n\t"
229 229
        " js 1b                         \n\t"
230 230
        : "+a" (len)
231
        : "r" (blk1a - len), "r" (blk1b -len), "r" (blk2 - len), "r" ((long)stride)
231
        : "r" (blk1a - len), "r" (blk1b -len), "r" (blk2 - len), "r" ((x86_reg)stride)
232 232
    );
233 233
}
234 234

  
235 235
static inline void sad8_4_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
236 236
{
237
    long len= -(stride*h);
237
    x86_reg len= -(stride*h);
238 238
    asm volatile(
239 239
        "movq (%1, %%"REG_a"), %%mm0    \n\t"
240 240
        "movq 1(%1, %%"REG_a"), %%mm2   \n\t"
......
281 281
        "add %4, %%"REG_a"              \n\t"
282 282
        " js 1b                         \n\t"
283 283
        : "+a" (len)
284
        : "r" (blk1 - len), "r" (blk1 -len + stride), "r" (blk2 - len), "r" ((long)stride)
284
        : "r" (blk1 - len), "r" (blk1 -len + stride), "r" (blk2 - len), "r" ((x86_reg)stride)
285 285
    );
286 286
}
287 287

  
libavcodec/i386/mpegvideo_mmx.c
34 34
static void dct_unquantize_h263_intra_mmx(MpegEncContext *s,
35 35
                                  DCTELEM *block, int n, int qscale)
36 36
{
37
    long level, qmul, qadd, nCoeffs;
37
    x86_reg level, qmul, qadd, nCoeffs;
38 38

  
39 39
    qmul = qscale << 1;
40 40

  
......
109 109
static void dct_unquantize_h263_inter_mmx(MpegEncContext *s,
110 110
                                  DCTELEM *block, int n, int qscale)
111 111
{
112
    long qmul, qadd, nCoeffs;
112
    x86_reg qmul, qadd, nCoeffs;
113 113

  
114 114
    qmul = qscale << 1;
115 115
    qadd = (qscale - 1) | 1;
......
200 200
static void dct_unquantize_mpeg1_intra_mmx(MpegEncContext *s,
201 201
                                     DCTELEM *block, int n, int qscale)
202 202
{
203
    long nCoeffs;
203
    x86_reg nCoeffs;
204 204
    const uint16_t *quant_matrix;
205 205
    int block0;
206 206

  
......
269 269
static void dct_unquantize_mpeg1_inter_mmx(MpegEncContext *s,
270 270
                                     DCTELEM *block, int n, int qscale)
271 271
{
272
    long nCoeffs;
272
    x86_reg nCoeffs;
273 273
    const uint16_t *quant_matrix;
274 274

  
275 275
    assert(s->block_last_index[n]>=0);
......
335 335
static void dct_unquantize_mpeg2_intra_mmx(MpegEncContext *s,
336 336
                                     DCTELEM *block, int n, int qscale)
337 337
{
338
    long nCoeffs;
338
    x86_reg nCoeffs;
339 339
    const uint16_t *quant_matrix;
340 340
    int block0;
341 341

  
......
401 401
static void dct_unquantize_mpeg2_inter_mmx(MpegEncContext *s,
402 402
                                     DCTELEM *block, int n, int qscale)
403 403
{
404
    long nCoeffs;
404
    x86_reg nCoeffs;
405 405
    const uint16_t *quant_matrix;
406 406

  
407 407
    assert(s->block_last_index[n]>=0);
libavcodec/i386/mpegvideo_mmx_template.c
95 95
                            DCTELEM *block, int n,
96 96
                            int qscale, int *overflow)
97 97
{
98
    long last_non_zero_p1;
98
    x86_reg last_non_zero_p1;
99 99
    int level=0, q; //=0 is because gcc says uninitialized ...
100 100
    const uint16_t *qmat, *bias;
101 101
    DECLARE_ALIGNED_16(int16_t, temp_block[64]);
libavcodec/i386/snowdsp_mmx.c
73 73
        IDWTELEM * const dst = b+w2;
74 74

  
75 75
        i = 0;
76
        for(; (((long)&dst[i]) & 0x1F) && i<w_r; i++){
76
        for(; (((x86_reg)&dst[i]) & 0x1F) && i<w_r; i++){
77 77
            dst[i] = dst[i] - (b[i] + b[i + 1]);
78 78
        }
79 79
        for(; i<w_r-15; i+=16){
......
146 146
        IDWTELEM * const src = b+w2;
147 147

  
148 148
        i = 0;
149
        for(; (((long)&temp[i]) & 0x1F) && i<w_r; i++){
149
        for(; (((x86_reg)&temp[i]) & 0x1F) && i<w_r; i++){
150 150
            temp[i] = src[i] - ((-W_AM*(b[i] + b[i+1]))>>W_AS);
151 151
        }
152 152
        for(; i<w_r-7; i+=8){
......
436 436
        "movdqa %%"s3", %%"t3" \n\t"
437 437

  
438 438
void ff_snow_vertical_compose97i_sse2(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width){
439
    long i = width;
439
    x86_reg i = width;
440 440

  
441 441
    while(i & 0x1F)
442 442
    {
......
534 534

  
535 535

  
536 536
void ff_snow_vertical_compose97i_mmx(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width){
537
    long i = width;
537
    x86_reg i = width;
538 538
    while(i & 15)
539 539
    {
540 540
        i--;
......
605 605

  
606 606
#define snow_inner_add_yblock_sse2_header \
607 607
    IDWTELEM * * dst_array = sb->line + src_y;\
608
    long tmp;\
608
    x86_reg tmp;\
609 609
    asm volatile(\
610 610
             "mov  %7, %%"REG_c"             \n\t"\
611 611
             "mov  %6, %2                    \n\t"\
......
667 667
             "jnz 1b                         \n\t"\
668 668
             :"+m"(dst8),"+m"(dst_array),"=&r"(tmp)\
669 669
             :\
670
             "rm"((long)(src_x<<1)),"m"(obmc),"a"(block),"m"((long)b_h),"m"((long)src_stride):\
670
             "rm"((x86_reg)(src_x<<1)),"m"(obmc),"a"(block),"m"((x86_reg)b_h),"m"((x86_reg)src_stride):\
671 671
             "%"REG_c"","%"REG_S"","%"REG_D"","%"REG_d"");
672 672

  
673 673
#define snow_inner_add_yblock_sse2_end_8\
......
684 684
             "dec %2                         \n\t"\
685 685
             snow_inner_add_yblock_sse2_end_common2
686 686

  
687
static void inner_add_yblock_bw_8_obmc_16_bh_even_sse2(const uint8_t *obmc, const long obmc_stride, uint8_t * * block, int b_w, long b_h,
688
                      int src_x, int src_y, long src_stride, slice_buffer * sb, int add, uint8_t * dst8){
687
static void inner_add_yblock_bw_8_obmc_16_bh_even_sse2(const uint8_t *obmc, const x86_reg obmc_stride, uint8_t * * block, int b_w, x86_reg b_h,
688
                      int src_x, int src_y, x86_reg src_stride, slice_buffer * sb, int add, uint8_t * dst8){
689 689
snow_inner_add_yblock_sse2_header
690 690
snow_inner_add_yblock_sse2_start_8("xmm1", "xmm5", "3", "0")
691 691
snow_inner_add_yblock_sse2_accum_8("2", "8")
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff