Revision c85007d5

View differences:

libswscale/swscale_template.c
80 80
        "mov                        (%%"REG_d"), %%"REG_S"  \n\t"\
81 81
        "jb                                  1b             \n\t"\
82 82
        :: "r" (&c->redDither),\
83
        "r" (dest), "g" (width)\
83
        "r" (dest), "g" ((x86_reg)width)\
84 84
        : "%"REG_a, "%"REG_d, "%"REG_S\
85 85
    );
86 86

  
......
142 142
        "mov                        (%%"REG_d"), %%"REG_S"  \n\t"\
143 143
        "jb                                  1b             \n\t"\
144 144
        :: "r" (&c->redDither),\
145
        "r" (dest), "g" (width)\
145
        "r" (dest), "g" ((x86_reg)width)\
146 146
        : "%"REG_a, "%"REG_d, "%"REG_S\
147 147
    );
148 148

  
......
180 180
/*
181 181
    :: "m" (-lumFilterSize), "m" (-chrFilterSize),
182 182
       "m" (lumMmxFilter+lumFilterSize*4), "m" (chrMmxFilter+chrFilterSize*4),
183
       "r" (dest), "m" (dstW),
183
       "r" (dest), "m" (dstW_reg),
184 184
       "m" (lumSrc+lumFilterSize), "m" (chrSrc+chrFilterSize)
185 185
    : "%eax", "%ebx", "%ecx", "%edx", "%esi"
186 186
*/
......
234 234
#define YSCALEYUV2PACKEDX_END                     \
235 235
        :: "r" (&c->redDither),                   \
236 236
            "m" (dummy), "m" (dummy), "m" (dummy),\
237
            "r" (dest), "m" (dstW)                \
237
            "r" (dest), "m" (dstW_reg)            \
238 238
        : "%"REG_a, "%"REG_d, "%"REG_S            \
239 239
    );
240 240

  
......
1025 1025
{
1026 1026
#if COMPILE_TEMPLATE_MMX
1027 1027
    x86_reg dummy=0;
1028
    x86_reg dstW_reg = dstW;
1028 1029
    if(!(c->flags & SWS_BITEXACT)) {
1029 1030
        if (c->flags & SWS_ACCURATE_RND) {
1030 1031
            switch(c->dstFormat) {
......
1063 1064

  
1064 1065
                :: "r" (&c->redDither),
1065 1066
                "m" (dummy), "m" (dummy), "m" (dummy),
1066
                "r" (dest), "m" (dstW)
1067
                "r" (dest), "m" (dstW_reg)
1067 1068
                : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S
1068 1069
                );
1069 1070
                return;
......
1137 1138

  
1138 1139
                :: "r" (&c->redDither),
1139 1140
                "m" (dummy), "m" (dummy), "m" (dummy),
1140
                "r" (dest),  "m" (dstW)
1141
                "r" (dest),  "m" (dstW_reg)
1141 1142
                : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S
1142 1143
                );
1143 1144
                return;
......
2328 2329
#endif /* COMPILE_TEMPLATE_MMX2 */
2329 2330
    x86_reg xInc_shr16 = xInc >> 16;
2330 2331
    uint16_t xInc_mask = xInc & 0xffff;
2332
    x86_reg dstWidth_reg = dstWidth;
2331 2333
    //NO MMX just normal asm ...
2332 2334
    __asm__ volatile(
2333 2335
        "xor %%"REG_a", %%"REG_a"            \n\t" // i
......
2355 2357
        " jb        1b                       \n\t"
2356 2358

  
2357 2359

  
2358
        :: "r" (src), "m" (dst), "m" (dstWidth), "m" (xInc_shr16), "m" (xInc_mask)
2360
        :: "r" (src), "m" (dst), "m" (dstWidth_reg), "m" (xInc_shr16), "m" (xInc_mask)
2359 2361
        : "%"REG_a, "%"REG_d, "%ecx", "%"REG_D, "%esi"
2360 2362
    );
2361 2363
#if COMPILE_TEMPLATE_MMX2
......
2468 2470
#endif /* COMPILE_TEMPLATE_MMX2 */
2469 2471
        x86_reg xInc_shr16 = (x86_reg) (xInc >> 16);
2470 2472
        uint16_t xInc_mask = xInc & 0xffff;
2473
        x86_reg dstWidth_reg = dstWidth;
2471 2474
        __asm__ volatile(
2472 2475
            "xor %%"REG_a", %%"REG_a"               \n\t" // i
2473 2476
            "xor %%"REG_d", %%"REG_d"               \n\t" // xx
......
2494 2497
/* GCC 3.3 makes MPlayer crash on IA-32 machines when using "g" operand here,
2495 2498
which is needed to support GCC 4.0. */
2496 2499
#if ARCH_X86_64 && AV_GCC_VERSION_AT_LEAST(3,4)
2497
            :: "m" (src1), "m" (dst), "g" (dstWidth), "m" (xInc_shr16), "m" (xInc_mask),
2500
            :: "m" (src1), "m" (dst), "g" (dstWidth_reg), "m" (xInc_shr16), "m" (xInc_mask),
2498 2501
#else
2499
            :: "m" (src1), "m" (dst), "m" (dstWidth), "m" (xInc_shr16), "m" (xInc_mask),
2502
            :: "m" (src1), "m" (dst), "m" (dstWidth_reg), "m" (xInc_shr16), "m" (xInc_mask),
2500 2503
#endif
2501 2504
            "r" (src2)
2502 2505
            : "%"REG_a, "%"REG_d, "%ecx", "%"REG_D, "%esi"

Also available in: Unified diff