[Mplayer-cvslog] CVS: main/loader win32.c,1.43,1.44

Michael Niedermayer michaelni at gmx.at
Mon Dec 31 19:13:41 CET 2001


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



More information about the MPlayer-cvslog mailing list