diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2011-06-24 10:52:43 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2011-06-24 10:52:43 +0000 |
| commit | fcae888e81a0794880b78d3e443ef814c2ac0e1b (patch) | |
| tree | 90eeaed9ba8194c01228f46ca903b53a486d79c6 /apps | |
| parent | 4b0e09c1ac2127151b100723ebe6233ee7757e6a (diff) | |
| download | rockbox-fcae888e81a0794880b78d3e443ef814c2ac0e1b.zip rockbox-fcae888e81a0794880b78d3e443ef814c2ac0e1b.tar.gz rockbox-fcae888e81a0794880b78d3e443ef814c2ac0e1b.tar.bz2 rockbox-fcae888e81a0794880b78d3e443ef814c2ac0e1b.tar.xz | |
SPC Codec: Restore correct FIR buffer alignment when an address mask is used. It must be FIR_BUF_ALIGN. Fix Coldfire assembly constraint where an input parameter was also being written.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30063 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/codecs/libspc/spc_dsp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/codecs/libspc/spc_dsp.c b/apps/codecs/libspc/spc_dsp.c index c5833e2..0017b2a 100644 --- a/apps/codecs/libspc/spc_dsp.c +++ b/apps/codecs/libspc/spc_dsp.c @@ -28,7 +28,8 @@ #include "spc_profiler.h" #if defined(CPU_COLDFIRE) || defined (CPU_ARM) -int32_t fir_buf[FIR_BUF_CNT] IBSS_ATTR_SPC MEM_ALIGN_ATTR; +int32_t fir_buf[FIR_BUF_CNT] IBSS_ATTR_SPC + __attribute__((aligned(FIR_BUF_ALIGN*1))); #endif #if SPC_BRRCACHE /* a little extra for samples that go past end */ @@ -1276,6 +1277,8 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) /* Feedback into echo buffer */ if ( !(this->r.g.flags & 0x20) ) { + int sh = 1 << 9; + asm volatile ( /* scale echo voices; saturate if overflow */ "mac.l %[sh], %[e1] , %%acc1 \r\n" @@ -1298,11 +1301,10 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) "or.l %[sh], %[e0] \r\n" /* save final feedback into echo buffer */ "move.l %[e0], (%[echo_ptr]) \r\n" - : [e0]"+d"(echo_0), [e1]"+d"(echo_1) + : [e0]"+d"(echo_0), [e1]"+d"(echo_1), [sh]"+d"(sh) : [out_0]"r"(out_0), [out_1]"r"(out_1), [ef]"r"((int)this->r.g.echo_feedback), - [echo_ptr]"a"((int32_t *)echo_ptr), - [sh]"d"(1 << 9) + [echo_ptr]"a"((int32_t *)echo_ptr) ); } |