[mythtv] PATCH: fix Mythmusic compile with gcc 3.4.1+
Robert Hardy
rhardy at webcon.ca
Sun Aug 15 13:48:58 EDT 2004
Please find attached and below a patch to allow Mythmusic to compile using
gcc-3.4.1. Apparently using the ebx register in gcc 3.4.1 is bad. gcc uses
it internally for bean counting or something. I changed the section of
problematic inline assembly code from using ebx to using ecx without any
obvious problems and the code now cleanly compiles.
diff -urNbB mythmusic-0.15.1/mythmusic/goom/zoom_filter_xmmx.c.orig mythmusic-0.15.1/mythmusic/goom/zoom_filter_xmmx.c
--- mythmusic-0.15.1/mythmusic/goom/zoom_filter_xmmx.c.orig 2004-02-19 23:13:17.000000000 -0500
+++ mythmusic-0.15.1/mythmusic/goom/zoom_filter_xmmx.c 2004-08-07 23:47:24.000000000 -0400
@@ -101,23 +101,23 @@
* post : mm3 & mm4 : coefs for this position
* mm1 : X vector [0|X]
*
- * modif : eax,ebx
+ * modif : eax,ecx
*/
__asm__ __volatile__ (
- "movd %%mm0,%%ebx\n"
+ "movd %%mm0,%%ecx\n"
"movq %%mm0,%%mm1\n"
- "andl $15,%%ebx\n"
+ "andl $15,%%ecx\n"
"psrlq $32,%%mm1\n"
- "shll $6,%%ebx\n"
+ "shll $6,%%ecx\n"
"movd %%mm1,%%eax\n"
- "addl %0,%%ebx\n"
+ "addl %0,%%ecx\n"
"andl $15,%%eax\n"
- "movd (%%ebx,%%eax,4),%%mm3\n"
- ::"m"(precalCoef):"eax","ebx");
+ "movd (%%ecx,%%eax,4),%%mm3\n"
+ ::"m"(precalCoef):"eax","ecx");
/*
* extraction des coefficients...
@@ -145,7 +145,7 @@
* post : mm0 : expix1[position]
* mm2 : expix1[position+largeur]
*
- * modif : eax,ebx
+ * modif : eax,ecx
*/
psrld_i2r (PERTEDEC,mm0);
psrld_i2r (PERTEDEC,mm1);
@@ -154,23 +154,23 @@
/*^*/ "movq %%mm3,%%mm5\n" /*^*/
"mull %1\n"
- "movd %%mm0,%%ebx\n"
+ "movd %%mm0,%%ecx\n"
/*^*/ "punpcklbw %%mm5, %%mm3\n" /*^*/
- "addl %%ebx,%%eax\n"
+ "addl %%ecx,%%eax\n"
/*^*/ "movq %%mm3,%%mm4\n" /*^*/
/*^*/ "movq %%mm3,%%mm5\n" /*^*/
- "movl %0,%%ebx\n"
+ "movl %0,%%ecx\n"
/*^*/ "punpcklbw %%mm5,%%mm3\n" /*^*/
- "movq (%%ebx,%%eax,4),%%mm0\n"
+ "movq (%%ecx,%%eax,4),%%mm0\n"
/*^*/ "punpckhbw %%mm5,%%mm4\n" /*^*/
"addl %1,%%eax\n"
- "movq (%%ebx,%%eax,4),%%mm2\n"
+ "movq (%%ecx,%%eax,4),%%mm2\n"
- : : "X"(expix1), "X"(prevX):"eax","ebx"
+ : : "X"(expix1), "X"(prevX):"eax","ecx"
);
/*
Regards,
Rob
--
---------------------"Happiness is understanding."----------------------
Robert Hardy, B.Eng Computer Systems C.E.O. Webcon Inc.
rhardy <at> webcon <dot> ca GPG Key available (613) 276-7327
-------------- next part --------------
diff -urNbB mythmusic-0.15.1/mythmusic/goom/zoom_filter_xmmx.c.orig mythmusic-0.15.1/mythmusic/goom/zoom_filter_xmmx.c
--- mythmusic-0.15.1/mythmusic/goom/zoom_filter_xmmx.c.orig 2004-02-19 23:13:17.000000000 -0500
+++ mythmusic-0.15.1/mythmusic/goom/zoom_filter_xmmx.c 2004-08-07 23:47:24.000000000 -0400
@@ -101,23 +101,23 @@
* post : mm3 & mm4 : coefs for this position
* mm1 : X vector [0|X]
*
- * modif : eax,ebx
+ * modif : eax,ecx
*/
__asm__ __volatile__ (
- "movd %%mm0,%%ebx\n"
+ "movd %%mm0,%%ecx\n"
"movq %%mm0,%%mm1\n"
- "andl $15,%%ebx\n"
+ "andl $15,%%ecx\n"
"psrlq $32,%%mm1\n"
- "shll $6,%%ebx\n"
+ "shll $6,%%ecx\n"
"movd %%mm1,%%eax\n"
- "addl %0,%%ebx\n"
+ "addl %0,%%ecx\n"
"andl $15,%%eax\n"
- "movd (%%ebx,%%eax,4),%%mm3\n"
- ::"m"(precalCoef):"eax","ebx");
+ "movd (%%ecx,%%eax,4),%%mm3\n"
+ ::"m"(precalCoef):"eax","ecx");
/*
* extraction des coefficients...
@@ -145,7 +145,7 @@
* post : mm0 : expix1[position]
* mm2 : expix1[position+largeur]
*
- * modif : eax,ebx
+ * modif : eax,ecx
*/
psrld_i2r (PERTEDEC,mm0);
psrld_i2r (PERTEDEC,mm1);
@@ -154,23 +154,23 @@
/*^*/ "movq %%mm3,%%mm5\n" /*^*/
"mull %1\n"
- "movd %%mm0,%%ebx\n"
+ "movd %%mm0,%%ecx\n"
/*^*/ "punpcklbw %%mm5, %%mm3\n" /*^*/
- "addl %%ebx,%%eax\n"
+ "addl %%ecx,%%eax\n"
/*^*/ "movq %%mm3,%%mm4\n" /*^*/
/*^*/ "movq %%mm3,%%mm5\n" /*^*/
- "movl %0,%%ebx\n"
+ "movl %0,%%ecx\n"
/*^*/ "punpcklbw %%mm5,%%mm3\n" /*^*/
- "movq (%%ebx,%%eax,4),%%mm0\n"
+ "movq (%%ecx,%%eax,4),%%mm0\n"
/*^*/ "punpckhbw %%mm5,%%mm4\n" /*^*/
"addl %1,%%eax\n"
- "movq (%%ebx,%%eax,4),%%mm2\n"
+ "movq (%%ecx,%%eax,4),%%mm2\n"
- : : "X"(expix1), "X"(prevX):"eax","ebx"
+ : : "X"(expix1), "X"(prevX):"eax","ecx"
);
/*
More information about the mythtv-dev
mailing list