1
0
Fork 0
forked from len0rd/rockbox

SPC Codec ARMv5: I didn't have fast gauss quite right.

Fix wrapping hazard which did eventually manifest on the right file.

Change-Id: I996a6efd3181b56fd172b5c3a526c7434f88bbbe
This commit is contained in:
Michael Sevakis 2013-05-26 00:33:30 -04:00
parent 00b8563654
commit 30fe6eb66c

View file

@ -55,14 +55,14 @@ static inline int gaussian_fast_amp( struct voice_t* voice, int output,
int* amp_0, int* amp_1 )
{
asm volatile (
"mov %[out], %[out], asr #15 \n"
"smulbb %[out], %[out], %[envx] \n"
"smulwb %[out], %[out], %[envx] \n"
: [out]"+r"(output)
: [envx]"r"(voice->envx));
asm volatile (
"mov %[out], %[out], asr #11 \n"
"smulbb %[a0], %[out], %[v0] \n"
"smulbb %[a1], %[out], %[v1] \n"
"mov %[out], %[out], asl #6 \n"
"smulwb %[a0], %[out], %[v0] \n"
"smulwb %[a1], %[out], %[v1] \n"
"mov %[out], %[out], asr #5 \n"
: [out]"+r"(output),
[a0]"=&r"(*amp_0), [a1]"=r"(*amp_1)
: [v0]"r"(voice->volume [0]),