[mythtv] [patch] libmythsoundtouch, mmx_gcc.cpp compile fix
Daniel Thor Kristjansson
danielk at mrl.nyu.edu
Sun Nov 14 01:17:27 UTC 2004
The current mmx_gcc.cpp won't compile unless you add a
-fomit-frame-pointer to the flags.
This patch fixes the compile problem, and also adds the MMX registers
to the list of spoiled registers. However, someone familiar with this
code should take a look at it. There appears to be no reason for shadow_ebx
to be an output variable. It also appears that the MMX registers are
never added to the list of clobbered registers throughout this file...
-- Daniel
-------------- next part --------------
Index: mmx_gcc.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythsoundtouch/mmx_gcc.cpp,v
retrieving revision 1.1
diff -r1.1 mmx_gcc.cpp
222c222
< unsigned long shadow_ebx;
---
> unsigned long shadow_ebx = (unsigned long) input;
228d227
< // load divider-shifter value to esi
234,237d232
< // We need to preserve esi, since gcc uses it for the
< // stack frame.
<
< "movl %%ebx, %0\n\t"
239,240c234,235
< "movl %1, %%eax\n\t" // ecx = 0x0000 OVL_
< "movl $0x0002fffe, %%edi\n\t" // ecx = 0x0002 fffe
---
> "movl $0x0002fffe, %%ecx\n\t" // ecx = 0x0002 fffe
> "movl %1, %%eax\n\t" // eax = 0x0000 OVL_
242,243c237
< //"movl %2, %%edx\n\t"
< "movl %2, %%esi\n\t"
---
> "movd %%ecx, %%mm5\n\t" // mm5 = 0x0000 0000 0002 fffe
245d238
<
246a240
>
252d245
< "movl %4, %%ebx\n\t"
254d246
< "movd %%edi, %%mm5\n\t" // mm5 = 0x0000 0000 0002 fffe
257c249
< "movl %5, %%eax\n\t" // dword ptr local_midBuffer
---
> "movl %4, %%eax\n\t" // dword ptr local_midBuffer
263,266d254
< //"push %%edx\n\t"
< //"pop %%esi\n\t"
< "movl %3, %%edx\n"
<
287c275
< "add $16, %%edx\n\t"
---
> "add $16, %3\n\t"
289c277
< "movq (%%ebx), %%mm3\n\t" // mm3 = i1l i1r i0l i0r
---
> "movq (%0), %%mm3\n\t" // mm3 = i1l i1r i0l i0r
295c283
< "movq 8(%%ebx), %%mm4\n\t" // mm4 = i3l i3r i2l i2r
---
> "movq 8(%0), %%mm4\n\t" // mm4 = i3l i3r i2l i2r
304c292
< "movd %%esi, %%mm4\n\t" // mm4 = overlapDividerBits
---
> "movd %2, %%mm4\n\t" // mm4 = overlapDividerBits
327,328c315,316
< "movq %%mm0, -16(%%edx)\n\t"
< "add $16, %%ebx\n\t"
---
> "movq %%mm0, -16(%3)\n\t"
> "add $16, %0\n\t"
330c318
< "movq %%mm2, -8(%%edx)\n\t"
---
> "movq %%mm2, -8(%3)\n\t"
337,339c325
< "movl %0, %%ebx\n\t"
<
< : "+rim" (shadow_ebx)/* output */
---
> : "+r" (shadow_ebx) /* output */
341,346c327,331
< "rim" (local_overlapDividerBits),
< "rim" (output),
< "rim" (input),
< "rim" (local_midBuffer)
< /* input */
< : "%edi", "%ecx", "%edx", "%eax", "%ebx", "%esi" /* regs */
---
> "r" (local_overlapDividerBits),
> "r" (output),
> "rim" (local_midBuffer) /* input */
> : "%eax", "%ecx",
> "%mm0", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5", "%mm6", "%mm7" /* regs */
More information about the mythtv-dev
mailing list