Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 136666 | Differences between
and this patch

Collapse All | Expand All

(-)linuxsampler-0.3.3.orig/src/engines/common/Resampler.h (-4 / +7 lines)
Lines 76-84 Link Here
76
76
77
#if CONFIG_ASM && ARCH_X86
77
#if CONFIG_ASM && ARCH_X86
78
            inline static void GetNext4SamplesMonoMMXSSE(sample_t* pSrc, void* Pos, float& Pitch) {
78
            inline static void GetNext4SamplesMonoMMXSSE(sample_t* pSrc, void* Pos, float& Pitch) {
79
                float __4f = 4.0f;
79
                if (INTERPOLATE) Interpolate4StepsMonoMMXSSE(pSrc, Pos, Pitch);
80
                if (INTERPOLATE) Interpolate4StepsMonoMMXSSE(pSrc, Pos, Pitch);
80
                else { // no pitch, so no interpolation necessary
81
                else { // no pitch, so no interpolation necessary
81
                    const float __4f = 4.0f;
82
                    __asm__ __volatile__ (
82
                    __asm__ __volatile__ (
83
                        "movss    (%1), %%xmm5           # load Pos\n\t"
83
                        "movss    (%1), %%xmm5           # load Pos\n\t"
84
                        "cvtss2si %%xmm5, %%edi          # int(Pos)\n\t"
84
                        "cvtss2si %%xmm5, %%edi          # int(Pos)\n\t"
Lines 96-102 Link Here
96
                        "movswl   6(%0,%%edi,2), %%edx   # load sample 3\n\t"
96
                        "movswl   6(%0,%%edi,2), %%edx   # load sample 3\n\t"
97
                        "cvtsi2ss  %%edx, %%xmm2         # convert to float\n\t"
97
                        "cvtsi2ss  %%edx, %%xmm2         # convert to float\n\t"
98
                        "shufps    $0x1b, %%xmm2, %%xmm2 # swap to correct order\n\t"
98
                        "shufps    $0x1b, %%xmm2, %%xmm2 # swap to correct order\n\t"
99
                        :: "r" (pSrc), "r" (Pos), "m" (&__4f)
99
                        :: "r" (pSrc), "r" (Pos), "m" (__4f)
100
                        :  "%eax", "%edx", "%edi"
100
                        :  "%eax", "%edx", "%edi"
101
                    );
101
                    );
102
                }
102
                }
Lines 107-113 Link Here
107
                    Interpolate4StepsStereoMMXSSE(pSrc, Pos, Pitch);
107
                    Interpolate4StepsStereoMMXSSE(pSrc, Pos, Pitch);
108
                    //EMMS;
108
                    //EMMS;
109
                } else { // no pitch, so no interpolation necessary
109
                } else { // no pitch, so no interpolation necessary
110
                    const float __4f = 4.0f;
110
			;
111
112
                    float __4f = 4.0f;
113
111
                    __asm__ __volatile__ (
114
                    __asm__ __volatile__ (
112
                        "movss    (%1), %%xmm5           # load Pos\n\t"
115
                        "movss    (%1), %%xmm5           # load Pos\n\t"
113
                        "cvtss2si %%xmm5, %%edi          # int(Pos)\n\t"
116
                        "cvtss2si %%xmm5, %%edi          # int(Pos)\n\t"
Lines 137-143 Link Here
137
                        "movswl  14(%0, %%edi,4), %%edx  # load sample 3 (right)\n\t"
140
                        "movswl  14(%0, %%edi,4), %%edx  # load sample 3 (right)\n\t"
138
                        "cvtsi2ss  %%edx, %%xmm3         # convert to float\n\t"
141
                        "cvtsi2ss  %%edx, %%xmm3         # convert to float\n\t"
139
                        "shufps    $0x1b, %%xmm3, %%xmm3 # swap to correct order\n\t"
142
                        "shufps    $0x1b, %%xmm3, %%xmm3 # swap to correct order\n\t"
140
                        :: "r" (pSrc), "r" (Pos), "m" (&__4f)
143
                        :: "r" (pSrc), "r" (Pos), "m" (__4f)
141
                        :  "%eax", "%edx", "%edi"
144
                        :  "%eax", "%edx", "%edi"
142
                    );
145
                    );
143
                }
146
                }

Return to bug 136666