summaryrefslogtreecommitdiff
path: root/apps/codecs/libspc/spc_dsp.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-12-23 07:36:21 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-12-23 07:36:21 +0000
commit6e4e5ea757bf30fc930e47aab5eadcb1ca4c65cb (patch)
tree99f4540e78c8a885f8fce81f009a0915d3c42b0e /apps/codecs/libspc/spc_dsp.c
parentd9e5c4159a1434470ebe9d8205790eb52e3a9618 (diff)
SPC Codec: Was broken on ARMv6 since EABI switch and somehow I failed to notice in the first place (and so did eveyone else it seems :). Some early-clobber constraints were needed on inline assemebly operands. In some places, they aren't necessary where they were used, so remove those.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28880 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspc/spc_dsp.c')
-rw-r--r--apps/codecs/libspc/spc_dsp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/codecs/libspc/spc_dsp.c b/apps/codecs/libspc/spc_dsp.c
index 0d07e5f04e..b4fc57158b 100644
--- a/apps/codecs/libspc/spc_dsp.c
+++ b/apps/codecs/libspc/spc_dsp.c
@@ -836,9 +836,9 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
"ldr %[_3], [%[rev]] \r\n" /* _3=r0r1 */
"smuad %[out], %[_0], %[_2] \r\n" /* out=f0*i0 + f1*i1 */
"smladx %[out], %[_1], %[_3], %[out] \r\n" /* out+=r1*i2 + r0*i3 */
- : [out]"=&r"(output),
+ : [out]"=r"(output),
[_0]"=&r"(amp_0), [_1]"=&r"(amp_1),
- [_2]"=&r"(_2), [_3]"=&r"(_3)
+ [_2]"=&r"(_2), [_3]"=r"(_3)
: [fwd]"r"(fwd), [rev]"r"(rev),
[interp]"r"(interp));
/* Apply voice envelope */
@@ -852,7 +852,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
"smulwb %[amp_0], %[out], %[vvol_0] \r\n" /* (32x16->48)[47:16]->[31:0] */
"smulwb %[amp_1], %[out], %[vvol_1] \r\n"
: [out]"+r"(output),
- [amp_0]"=r"(amp_0), [amp_1]"=r"(amp_1)
+ [amp_0]"=&r"(amp_0), [amp_1]"=r"(amp_1)
: [vvol_0]"r"(voice->volume[0]),
[vvol_1]"r"(voice->volume[1]));
@@ -889,7 +889,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
"mul %[amp_0], %[out], %[vvol_0] \r\n"
"mul %[amp_1], %[out], %[vvol_1] \r\n"
: [out]"+r"(output),
- [amp_0]"=r"(amp_0), [amp_1]"=r"(amp_1)
+ [amp_0]"=&r"(amp_0), [amp_1]"=r"(amp_1)
: [vvol_0]"r"((int)voice->volume[0]),
[vvol_1]"r"((int)voice->volume[1]));
@@ -930,7 +930,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
"smultb %[_3], %[_1], %[_3] \r\n" /* _3=r0*i3 */
: [out]"=r"(output),
[_0]"=&r"(amp_0), [_1]"=&r"(amp_1),
- [_2]"=&r"(_2), [_3]"=&r"(_3)
+ [_2]"=&r"(_2), [_3]"=r"(_3)
: [fwd]"r"(fwd), [rev]"r"(rev),
[interp]"r"(interp));
asm volatile (
@@ -956,7 +956,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
"mul %[amp_0], %[out], %[vvol_0] \r\n"
"mul %[amp_1], %[out], %[vvol_1] \r\n"
: [out]"+r"(output),
- [amp_1]"=r"(amp_1), [amp_0]"=r"(amp_0)
+ [amp_0]"=&r"(amp_0), [amp_1]"=r"(amp_1)
: [vvol_0]"r"((int)voice->volume[0]),
[vvol_1]"r"((int)voice->volume[1]));
@@ -989,7 +989,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
"mov %[_3], %[_3], asr #12 \r\n"
"mov %[_3], %[_3], asl #1 \r\n"
"add %[out], %[_3], %[_2], asr #16 \r\n"
- : [out]"=r"(output),
+ : [out]"=&r"(output),
[_0]"=&r"(amp_0), [_1]"=&r"(amp_1),
[_2]"=&r"(_2), [_3]"=&r"(_3)
: [fwd]"r"(fwd), [rev]"r"(rev),
@@ -1008,8 +1008,8 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
"bic %[out], %[out], #0x1 \r\n"
"mul %[amp_0], %[out], %[vvol_0] \r\n"
"mul %[amp_1], %[out], %[vvol_1] \r\n"
- : [out]"+r"(output), [amp_0]"+r"(amp_0),
- [amp_1]"=r"(amp_1)
+ : [out]"+r"(output),
+ [amp_0]"+r"(amp_0), [amp_1]"=r"(amp_1)
: [vvol_0]"r"((int)voice->volume[0]),
[vvol_1]"r"((int)voice->volume[1]));
@@ -1137,7 +1137,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
"mul %[amp_1], %[amp_0], %[envx] \r\n"
"mov %[amp_0], %[amp_1], asr #11 \r\n"
"mov %[amp_1], %[amp_0], asr #8 \r\n"
- : [amp_0]"+r"(amp_0), [amp_1]"=&r"(amp_1)
+ : [amp_0]"+r"(amp_0), [amp_1]"=r"(amp_1)
: [envx]"r"(voice->envx));
prev_outx = amp_0;
@@ -1146,7 +1146,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
asm volatile(
"mul %[amp_1], %[amp_0], %[vol_1] \r\n"
"mul %[amp_0], %[vol_0], %[amp_0] \r\n"
- : [amp_0]"+r"(amp_0), [amp_1]"+r"(amp_1)
+ : [amp_0]"+r"(amp_0), [amp_1]"=&r"(amp_1)
: [vol_0]"r"((int)voice->volume[0]),
[vol_1]"r"((int)voice->volume[1]));
#else /* Unoptimized CPU */
@@ -1385,7 +1385,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
asm volatile (
"mul %[amp_0], %[gvol_0], %[chans_0] \r\n"
"mul %[amp_1], %[gvol_1], %[chans_1] \r\n"
- : [amp_0]"=&r"(amp_0), [amp_1]"=&r"(amp_1)
+ : [amp_0]"=&r"(amp_0), [amp_1]"=r"(amp_1)
: [gvol_0]"r"(global_vol_0), [gvol_1]"r"(global_vol_1),
[chans_0]"r"(chans_0), [chans_1]"r"(chans_1));
asm volatile (