CVS: main/loader win32.c,1.43,1.44
Update of /cvsroot/mplayer/main/loader In directory mplayer:/var/tmp.root/cvs-serv5462/loader Modified Files: win32.c Log Message: workaround for the guilty code that caused sig11 when compiled with gcc-3.0.x (using the old C version - before the Big Indent patch :) Index: win32.c =================================================================== RCS file: /cvsroot/mplayer/main/loader/win32.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- win32.c 23 Dec 2001 16:14:13 -0000 1.43 +++ win32.c 31 Dec 2001 17:22:41 -0000 1.44 @@ -3410,6 +3410,18 @@ // of debuging fixing & testing - it's almost unimaginable - kabi // _ftol - operated on the float value which is already on the FPU stack + +#ifdef MPLAYER +// Note: the asm version is buggy and causes mysterious sig11 with gcc-3.0 +// flavors so we'd better stick to the old one for the moment (C version +// is found in release 1.39 of this file in MPlayer CVS) - pl +int +exp_ftol (float f) +{ + return (int) (f + .5); +} +#else +#warning "exp_ftol may cause sig11" static void exp_ftol(void) { __asm__ __volatile__ @@ -3426,6 +3438,7 @@ "mov -12(%ebp), %eax \n\t" ); } +#endif static double exppow(double x, double y) {
Hi, the C version won't work for ACEL.P codec :( we should fix the asm version..
Update of /cvsroot/mplayer/main/loader In directory mplayer:/var/tmp.root/cvs-serv5462/loader
Modified Files: win32.c Log Message: workaround for the guilty code that caused sig11 when compiled with gcc-3.0.x (using the old C version - before the Big Indent patch :)
Index: win32.c =================================================================== RCS file: /cvsroot/mplayer/main/loader/win32.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- win32.c 23 Dec 2001 16:14:13 -0000 1.43 +++ win32.c 31 Dec 2001 17:22:41 -0000 1.44 @@ -3410,6 +3410,18 @@ // of debuging fixing & testing - it's almost unimaginable - kabi
// _ftol - operated on the float value which is already on the FPU stack + +#ifdef MPLAYER +// Note: the asm version is buggy and causes mysterious sig11 with gcc-3.0 +// flavors so we'd better stick to the old one for the moment (C version +// is found in release 1.39 of this file in MPlayer CVS) - pl +int +exp_ftol (float f) +{ + return (int) (f + .5); +} +#else +#warning "exp_ftol may cause sig11" static void exp_ftol(void) { __asm__ __volatile__ @@ -3426,6 +3438,7 @@ "mov -12(%ebp), %eax \n\t" ); } +#endif
static double exppow(double x, double y) {
_______________________________________________ Mplayer-cvslog mailing list Mplayer-cvslog@mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/mplayer-cvslog
A'rpi / Astral & ESP-team -- mailto:arpi@thot.banki.hu http://esp-team.scene.hu
Hi,
the C version won't work for ACEL.P codec :( we should fix the asm version.. mixing asm & c in such a way is not very smart ... that stuff should be written without c to avoid gcc messing things up ... anyway that might not be
Hi On Monday 31 December 2001 18:26, Arpi wrote: the problem here i dunno why it segfaults, and i dunno how to test it a gdb bt & disasm might be usefull Michael
Hi On Monday 31 December 2001 19:01, Michael Niedermayer wrote: [...]
the C version won't work for ACEL.P codec :( we should fix the asm version.. [...] i know why it dies, gcc 3 is better then gcc 2.95 it omits unnecessary instructions ... (not a gcc bug, its a bug in win32.c)
try (untested) __asm__ __volatile__ ( "subl $12, %esp \n\t" "fstcw -2(%ebp) \n\t" "wait \n\t" "movw -2(%ebp), %ax \n\t" "orb $0x0C, %ah \n\t" "movw %ax, -4(%ebp) \n\t" "fldcw -4(%ebp) \n\t" "fistpl -12(%ebp) \n\t" "fldcw -2(%ebp) \n\t" "movl -12(%ebp), %eax \n\t" "movl %ebp, %esp \n\t" // gcc 3.03 does not do that if it knows that ebp=esp ); Michael
Hi,
"fldcw -2(%ebp) \n\t" "movl -12(%ebp), %eax \n\t" "movl %ebp, %esp \n\t" // gcc 3.03 does not do that if it knows that ebp=esp );
can you fix it? i think pl can test it then. A'rpi / Astral & ESP-team -- mailto:arpi@thot.banki.hu http://esp-team.scene.hu
Hi On Monday 31 December 2001 19:38, Arpi wrote:
Hi,
"fldcw -2(%ebp) \n\t" "movl -12(%ebp), %eax \n\t" "movl %ebp, %esp \n\t" // gcc 3.03 does not do that if it knows that ebp=esp );
can you fix it? ehh, that is supposed to be the fixed version, sorry for not sending a diff -Naur bzipped base64 encoded patch ;) gcc 3.03 did not do "movl %ebp, %esp" so i added it at the end
[...] Michael
Hi,
Hi,
"fldcw -2(%ebp) \n\t" "movl -12(%ebp), %eax \n\t" "movl %ebp, %esp \n\t" // gcc 3.03 does not do that if it knows that ebp=esp );
can you fix it? ehh, that is supposed to be the fixed version, sorry for not sending a diff -Naur bzipped base64 encoded patch ;)
ah sorry.. checked it again and really "try this (untested)" i think i already drank too much :))) (cola, of course :)) A'rpi / Astral & ESP-team -- mailto:arpi@thot.banki.hu http://esp-team.scene.hu
On Mon, Dec 31, 2001 at 08:56:12PM +0200, Arpi wrote:
Hi,
Hi,
"fldcw -2(%ebp) \n\t" "movl -12(%ebp), %eax \n\t" "movl %ebp, %esp \n\t" // gcc 3.03 does not do that if it knows that ebp=esp );
can you fix it? ehh, that is supposed to be the fixed version, sorry for not sending a diff -Naur bzipped base64 encoded patch ;)
ah sorry.. checked it again and really "try this (untested)"
I've tested it with gcc 2.95.4 and 3.0.3 and it works fine. I'm about to apply it.
i think i already drank too much :)))
(cola, of course :))
of course :) Happy new year all. -- Best regards, pl
participants (4)
-
Arpi -
Michael Niedermayer -
pl -
pl