Ticket #5997: st-reg_c.diff

File st-reg_c.diff, 2.1 KB (added by foobum@…, 15 years ago)
  • mythtv/libs/libmythsoundtouch/sse_gcc.cpp

    diff --git a/mythtv/libs/libmythsoundtouch/sse_gcc.cpp b/mythtv/libs/libmythsoundtouch/sse_gcc.cpp
    index c26d9a3..de00bee 100644
    a b __attribute__((noinline)) 
    125125void TDStretchSSE2::overlapMulti(short *output, const short *input) const
    126126{
    127127    asm(
    128         "movd       %%ecx, %%xmm0       \n\t"
     128        "movd       %0, %%xmm0          \n\t"
    129129        "shl        %6                  \n\t"
    130130        "punpckldq  %%xmm0, %%xmm0      \n\t"
    131131        "movq       %2, %%xmm2          \n\t"
    void TDStretchSSE2::overlapMulti(short *output, const short *input) const 
    158158        "paddw      %%xmm2, %%xmm0      \n\t"
    159159        "movdqu     %%xmm4, (%5)        \n\t"
    160160        "add        %6, %5              \n\t"
    161         "sub        $1, %%ecx           \n\t"
     161        "sub        $1, %0              \n\t"
    162162        "jnz        1b                  \n\t"
    163         ::"c"(overlapLength),"m"(sadd),"m"(ones),"r"(input),"r"(pMidBuffer),
     163        ::"r"(overlapLength),"m"(sadd),"m"(ones),"r"(input),"r"(pMidBuffer),
    164164          "r"(output),"r"((long)channels)
    165165    );
    166166}
    __attribute__((noinline)) 
    169169void TDStretchSSE2::overlapStereo(short *output, const short *input) const
    170170{
    171171    asm(
    172         "movd       %%ecx, %%mm0        \n\t"
     172        "movd       %0, %%mm0           \n\t"
    173173        "pxor       %%mm7, %%mm7        \n\t"
    174174        "punpckldq  %%mm0, %%mm0        \n\t"
    175175        "shr        %%ecx               \n\t"
    void TDStretchSSE2::overlapStereo(short *output, const short *input) const 
    203203        "paddw      %%mm2, %%mm6        \n\t"
    204204        "movq       %%mm4, (%5)         \n\t"
    205205        "add        $8, %5              \n\t"
    206         "sub        $1, %%ecx           \n\t"
     206        "sub        $1, %0              \n\t"
    207207        "jnz        1b                  \n\t"
    208208        "emms                           \n\t"
    209         ::"c"(overlapLength),"m"(sadd),"m"(ones),"r"(input),"r"(pMidBuffer),
     209        ::"r"(overlapLength),"m"(sadd),"m"(ones),"r"(input),"r"(pMidBuffer),
    210210          "r"(output)
    211211    );
    212212}