Revision 2c70770e

View differences:

libavcodec/i386/flacdsp_mmx.c
36 36
        "addsd   %%xmm6, %%xmm7 \n\t"
37 37
        ::"m"(c), "m"(*ff_pd_1), "m"(*ff_pd_2)
38 38
    );
39
#define WELCH(MOVPD)\
39
#define WELCH(MOVPD, offset)\
40 40
    asm volatile(\
41 41
        "1:                         \n\t"\
42 42
        "movapd   %%xmm7,  %%xmm1   \n\t"\
......
44 44
        "movapd   %%xmm6,  %%xmm0   \n\t"\
45 45
        "subpd    %%xmm1,  %%xmm0   \n\t"\
46 46
        "pshufd   $0x4e,   %%xmm0, %%xmm1 \n\t"\
47
        "cvtpi2pd (%4,%0), %%xmm2   \n\t"\
48
        "cvtpi2pd (%5,%1), %%xmm3   \n\t"\
47
        "cvtpi2pd (%3,%0), %%xmm2   \n\t"\
48
        "cvtpi2pd "#offset"*4(%3,%1), %%xmm3 \n\t"\
49 49
        "mulpd    %%xmm0,  %%xmm2   \n\t"\
50 50
        "mulpd    %%xmm1,  %%xmm3   \n\t"\
51 51
        "movapd   %%xmm2, (%2,%0,2) \n\t"\
52
        MOVPD"    %%xmm3, (%3,%1,2) \n\t"\
52
        MOVPD"    %%xmm3, "#offset"*8(%2,%1,2) \n\t"\
53 53
        "subpd    %%xmm5,  %%xmm7   \n\t"\
54 54
        "sub      $8,      %1       \n\t"\
55 55
        "add      $8,      %0       \n\t"\
56 56
        "jl 1b                      \n\t"\
57 57
        :"+&r"(i), "+&r"(j)\
58
        :"r"(w_data+n2), "r"(w_data+len-2-n2),\
59
         "r"(data+n2), "r"(data+len-2-n2)\
58
        :"r"(w_data+n2), "r"(data+n2)\
60 59
    );
61 60
    if(len&1)
62
        WELCH("movupd")
61
        WELCH("movupd", -1)
63 62
    else
64
        WELCH("movapd")
63
        WELCH("movapd", -2)
65 64
#undef WELCH
66 65
}
67 66

  

Also available in: Unified diff