Hi, attached is patch to compile mplayer with gcc4. number of problems fixed. Most "real" ones are (1) "X" vs. "m" in inline asm in mmx.h and (2) several cases when expression was specified for "m" (memory) for inline asm. gcc4 generates incorrect asm in 1-st case and report "memory location not directly addressable" in 2-nd. Rest of fixes are trivial. I verified on all movies I have that it works. Patch applies to last CVS version I downloaded, MPlayer-20050413 Regards, Vladimir
Hi, On 4/14/05, Vladimir Kondratiev <vladimir.kondratiev@intel.com> wrote:
Hi, attached is patch to compile mplayer with gcc4. number of problems fixed. Most "real" ones are (1) "X" vs. "m" in inline asm in mmx.h and (2) several cases when expression was specified for "m" (memory) for inline asm. gcc4 generates incorrect asm in 1-st case and report "memory location not directly addressable" in 2-nd. Rest of fixes are trivial.
I verified on all movies I have that it works.
Patch applies to last CVS version I downloaded, MPlayer-20050413
Regards, Vladimir
Thanks a lot Vladimir! I've tested your patch on my AMD-64, and it works really well. I just hope this patch can make it to the next release, as the new upcoming Fedora Core will use GCC-4 by default. I haven't tested the performance difference though... Regards, Guillaume
On Thu, Apr 14, 2005 at 05:01:52PM +0300, Vladimir Kondratiev wrote:
diff -bBur MPlayer-20050413-orig/liba52/imdct.c MPlayer-20050413/liba52/imdct.c --- MPlayer-20050413-orig/liba52/imdct.c 2005-03-23 01:27:18.000000000 +0200 +++ MPlayer-20050413/liba52/imdct.c 2005-04-14 16:48:54.000000000 +0300 @@ -937,7 +937,8 @@ /* 4-7. iterations */ for (m=3; m < 7; m++) { two_m = (1 << m); - two_m_plus_one = two_m<<1; + int two_m_plus_four=two_m<<4; + complex_t* buf_plus_128=buf+128;
Parse error before int. Gcc 2.95 won't like this. Torinthiel -- Waclaw "Torinthiel" Schiller GG#: 542916, 3073512 torinthiel(at)megapolis(dot)pl gpg: 0906A2CE fpr: EE3E DFB4 C4D6 E22E 8999 D714 7CEB CDDC 0906 A2CE "No classmates may be used during this examination"
On Thu, Apr 14, 2005 at 05:01:52PM +0300, Vladimir Kondratiev wrote:
attached is patch to compile mplayer with gcc4.
Fails with gcc 2.95: imdct.c: In function `imdct_do_512_sse': imdct.c:940: parse error before `int' imdct.c:967: `buf_plus_128' undeclared (first use in this function) imdct.c:967: (Each undeclared identifier is reported only once imdct.c:967: for each function it appears in.) imdct.c:967: `two_m_plus_four' undeclared (first use in this function) make[1]: *** [imdct.o] Error 1 make[1]: Leaving directory `/usr/src/mplayer/dev/liba52' make: *** [liba52/liba52.a] Error 2 Patch rejected. Diego
On Sat, Apr 16, 2005 at 02:17:42AM +0200, Diego Biurrun wrote:
On Thu, Apr 14, 2005 at 05:01:52PM +0300, Vladimir Kondratiev wrote:
attached is patch to compile mplayer with gcc4.
Fails with gcc 2.95:
imdct.c: In function `imdct_do_512_sse': imdct.c:940: parse error before `int' imdct.c:967: `buf_plus_128' undeclared (first use in this function) imdct.c:967: (Each undeclared identifier is reported only once imdct.c:967: for each function it appears in.) imdct.c:967: `two_m_plus_four' undeclared (first use in this function) make[1]: *** [imdct.o] Error 1 make[1]: Leaving directory `/usr/src/mplayer/dev/liba52' make: *** [liba52/liba52.a] Error 2
Patch rejected.
Diego
with gcc2.95 you must put declaration at block begin -- Gianluigi Tiesi <sherpya@netfarm.it> EDP Project Leader Netfarm S.r.l. - http://www.netfarm.it/ Free Software: http://oss.netfarm.it/
On Thu, 2005-04-14 at 09:01, Vladimir Kondratiev wrote:
Hi, attached is patch to compile mplayer with gcc4. number of problems fixed. Most "real" ones are (1) "X" vs. "m" in inline asm in mmx.h and (2) several cases when expression was specified for "m" (memory) for inline asm. gcc4 generates incorrect asm in 1-st case and report "memory location not directly addressable" in 2-nd. Rest of fixes are trivial.
I verified on all movies I have that it works.
Patch applies to last CVS version I downloaded, MPlayer-20050413
Regards, Vladimir
----
I am trying to compile cvs 20040417 on a fedora core 4 test2 box and got a lot further with this patch than without. I am not a c coder and do not know the proper way to fix following lvalue error: cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O4 -march=i586 -mtune=i586 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I.. -I../osdep -I/usr/include/freetype2 -I/usr/include/SDL -D_REENTRANT -I/usr/X11R6/include -DMPG12PLAY -o aclib.o aclib.c In file included from aclib.c:84: aclib_template.c: In function 'fast_memcpy_MMX2': aclib_template.c:252: error: invalid lvalue in assignment aclib_template.c:253: error: invalid lvalue in assignment aclib_template.c:341: error: invalid lvalue in assignment aclib_template.c:342: error: invalid lvalue in assignment make[1]: *** [aclib.o] Error 1 I am assuming this is one of the lvalue/rvalue deals that gcc4 has disallowed : from aclib_template.c 251 :: "r" (from), "r" (to) : "memory"); 252 ((const unsigned char *)from)+=64; 253 ((unsigned char *)to)+=64; lines 341 and 342 are the same deal. I do not understand enough about what is happening to fix it. It looks like the value of from is being treated as a pointer and incremented by 64 or something like that but is declared as type memory? If someone can give me a hint I will try to fix it. Bret
I have problem to compile mplayer with gcc4 when mmx is enabled too: make[1]: Entering directory `/t/portage/mplayer-1.0_pre7/work/MPlayer-1.0pre7/libvo' cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O4 -march=athlon-4 -mtune=athlon-4 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I. -I.. -I../osdep -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -DMPG12PLAY -o aclib.o aclib.c In file included from aclib.c:84: aclib_template.c: In function 'fast_memcpy_MMX2': aclib_template.c:252: error: invalid lvalue in assignment aclib_template.c:253: error: invalid lvalue in assignment aclib_template.c:341: error: invalid lvalue in assignment aclib_template.c:342: error: invalid lvalue in assignment make[1]: *** [aclib.o] Error 1 make[1]: Leaving directory `/t/portage/mplayer-1.0_pre7/work/MPlayer-1.0pre7/libvo' On 18 Apr 2005 00:51:28 -0500, Bret Hughes <bhughes@elevating.com> wrote:
On Thu, 2005-04-14 at 09:01, Vladimir Kondratiev wrote:
Hi, attached is patch to compile mplayer with gcc4. number of problems fixed. Most "real" ones are (1) "X" vs. "m" in inline asm in mmx.h and (2) several cases when expression was specified for "m" (memory) for inline asm. gcc4 generates incorrect asm in 1-st case and report "memory location not directly addressable" in 2-nd. Rest of fixes are trivial.
I verified on all movies I have that it works.
Patch applies to last CVS version I downloaded, MPlayer-20050413
Regards, Vladimir
----
I am trying to compile cvs 20040417 on a fedora core 4 test2 box and got a lot further with this patch than without. I am not a c coder and do not know the proper way to fix following lvalue error:
cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O4 -march=i586 -mtune=i586 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I.. -I../osdep -I/usr/include/freetype2 -I/usr/include/SDL -D_REENTRANT -I/usr/X11R6/include -DMPG12PLAY -o aclib.o aclib.c In file included from aclib.c:84: aclib_template.c: In function 'fast_memcpy_MMX2': aclib_template.c:252: error: invalid lvalue in assignment aclib_template.c:253: error: invalid lvalue in assignment aclib_template.c:341: error: invalid lvalue in assignment aclib_template.c:342: error: invalid lvalue in assignment make[1]: *** [aclib.o] Error 1
I am assuming this is one of the lvalue/rvalue deals that gcc4 has disallowed :
from aclib_template.c 251 :: "r" (from), "r" (to) : "memory"); 252 ((const unsigned char *)from)+=64; 253 ((unsigned char *)to)+=64;
lines 341 and 342 are the same deal.
I do not understand enough about what is happening to fix it. It looks like the value of from is being treated as a pointer and incremented by 64 or something like that but is declared as type memory? If someone can give me a hint I will try to fix it.
Bret
_______________________________________________ MPlayer-dev-eng mailing list MPlayer-dev-eng@mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
-- Genady Okrain AKA Mafteah http://www.mafteah.co.il
participants (7)
-
Bret Hughes -
Diego Biurrun -
Genady Okrain -
Gianluigi Tiesi -
Guillaume Poirier -
Torinthiel -
Vladimir Kondratiev