From e12f387870ff1bc1356e0dd514870c06b24aa2c2 Mon Sep 17 00:00:00 2001 From: arpi Date: Tue, 24 Dec 2002 00:05:43 +0000 Subject: decode_i586.c version uses %ebp for its own use, so: - we need to compile this with -fomit-frame-pointer or we cannot access the function parameters - we need to save & restore %ebp, or we'll destroy the caller's stack ptr git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8544 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mp3lib/decod386.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mp3lib/decod386.c') diff --git a/mp3lib/decod386.c b/mp3lib/decod386.c index ca9979b2a4..efbcae0f3b 100644 --- a/mp3lib/decod386.c +++ b/mp3lib/decod386.c @@ -164,18 +164,19 @@ static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt) static const int step = 2; static int bo = 1; short *samples = (short *) (out + *pnt); - real *b0,(*buf)[0x110]; int clip = 0; int bo1; + + *pnt += 128; + /* optimized for x86 */ #if defined(CAN_COMPILE_X86_ASM) if ( synth_func ) { - int ret; - ret=(*synth_func)( bandPtr,channel,samples); - *pnt+=128; - return ret; +// printf("Calling %p, bandPtr=%p channel=%d samples=%p\n",synth_func,bandPtr,channel,samples); + // FIXME: synth_func() may destroy EBP, don't rely on stack contents!!! + return (*synth_func)( bandPtr,channel,samples); } #endif if(!channel) { /* channel=0 */ @@ -264,7 +265,6 @@ static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt) WRITE_SAMPLE(samples,sum,clip); } } - *pnt += 128; return clip; -- cgit v1.2.3