From 06a98b15bc0c6eff2c677dff07073ec78f67a41b Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 4 Jun 2010 02:20:19 +0000 Subject: SPC codec: The inline asm 'memory' clobbers should be unneeded since the ASM either does not modify memory (only loads values), or it modifies things only other ASM blocks deal with and the operand constraints mark them as in/out/both. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26538 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libspc/spc_dsp.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'apps/codecs/libspc/spc_dsp.c') diff --git a/apps/codecs/libspc/spc_dsp.c b/apps/codecs/libspc/spc_dsp.c index a5ad1ff877..0d07e5f04e 100644 --- a/apps/codecs/libspc/spc_dsp.c +++ b/apps/codecs/libspc/spc_dsp.c @@ -840,8 +840,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) [_0]"=&r"(amp_0), [_1]"=&r"(amp_1), [_2]"=&r"(_2), [_3]"=&r"(_3) : [fwd]"r"(fwd), [rev]"r"(rev), - [interp]"r"(interp) - : "memory"); + [interp]"r"(interp)); /* Apply voice envelope */ asm volatile ( "mov %[_2], %[out], asr #(11-5) \r\n" /* To do >> 16 later */ @@ -877,8 +876,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) [_0]"=&r"(amp_0), [_1]"=&r"(amp_1), [_2]"=&r"(_2), [_3]"=&r"(_3) : [fwd]"r"(fwd), [rev]"r"(rev), - [interp]"r"(interp) - : "memory"); + [interp]"r"(interp)); /* Apply voice envelope */ asm volatile ( "mov %[_2], %[out], asr #11 \r\n" @@ -934,8 +932,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) [_0]"=&r"(amp_0), [_1]"=&r"(amp_1), [_2]"=&r"(_2), [_3]"=&r"(_3) : [fwd]"r"(fwd), [rev]"r"(rev), - [interp]"r"(interp) - : "memory"); + [interp]"r"(interp)); asm volatile ( "mov %[out], %[out], asr#12 \r\n" "add %[_0], %[out], %[_0], asr #12 \r\n" @@ -996,8 +993,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) [_0]"=&r"(amp_0), [_1]"=&r"(amp_1), [_2]"=&r"(_2), [_3]"=&r"(_3) : [fwd]"r"(fwd), [rev]"r"(rev), - [interp]"r"(interp) - : "memory"); + [interp]"r"(interp)); output = CLAMP16(output); } @@ -1132,9 +1128,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) "sub %[y1], %[y1], %[y0] \r\n" "mul %[f], %[y1], %[f] \r\n" "add %[y0], %[y0], %[f], asr #12 \r\n" - : [f]"+r"(f), [y0]"+r"(amp_0), [y1]"=&r"(amp_1) - : - : "memory"); + : [f]"+r"(f), [y0]"+r"(amp_0), [y1]"=&r"(amp_1)); } voice->position += rate; @@ -1353,8 +1347,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) /* duplicate at +8 eliminates wrap checking below */ "str %[fb_0], [%[fir_p], #28] \r\n" : [fir_p]"=&r"(fir_ptr), [t_fir_p]"+r"(this->fir_ptr) - : [fb_0]"r"(fb_0), [mask]"i"(~FIR_BUF_MASK) - : "memory"); + : [fb_0]"r"(fb_0), [mask]"i"(~FIR_BUF_MASK)); fir_coeff = (int32_t *)this->fir_coeff; @@ -1384,7 +1377,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) : [acc0]"+r"(fb_0), [acc1]"=&r"(fb_1), [_0]"=&r"(_0), [fir_p]"+r"(fir_ptr), [fir_c]"+r"(fir_coeff) : - : "r0", "r1", "r2", "r3", "r4", "r5", "memory"); + : "r0", "r1", "r2", "r3", "r4", "r5"); /* Generate output */ int amp_0, amp_1; @@ -1446,8 +1439,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) "str %[fb_0], [%[fir_p], #56] \r\n" "str %[fb_1], [%[fir_p], #60] \r\n" : [fir_p]"=&r"(fir_ptr), [t_fir_p]"+r"(this->fir_ptr) - : [fb_0]"r"(fb_0), [fb_1]"r"(fb_1), [mask]"i"(~FIR_BUF_MASK) - : "memory"); + : [fb_0]"r"(fb_0), [fb_1]"r"(fb_1), [mask]"i"(~FIR_BUF_MASK)); fir_coeff = this->fir_coeff; @@ -1479,7 +1471,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) : [fb_0]"+r"(fb_0), [fb_1]"+r"(fb_1), [fir_p]"+r"(fir_ptr), [fir_c]"+r"(fir_coeff) : - : "r0", "r1", "r2", "r3", "r4", "r5", "memory"); + : "r0", "r1", "r2", "r3", "r4", "r5"); /* Generate output */ int amp_0 = (chans_0 * global_vol_0 + fb_0 * this->r.g.echo_volume_0) -- cgit v1.2.3