diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-11 06:39:32 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-11 06:39:32 +0000 |
commit | 2f7bb96c3dbd462dabd13f75c1a97e4140f093e5 (patch) | |
tree | e27d73a26912dec983680706b0dd583e6ecccf9e /firmware/target/arm/as3525/pcm-as3525.c | |
parent | 675dcd1a9cc51c295304d8fdc3252eb2bc029b78 (diff) |
as3525v1: drop the asm version of mono2stereo
When building with eabi gcc, 2 variables are assigned the same register
This might be a bug in the constraints, but it's just simpler to use C,
even at the cost of 1 cycle per loop
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26761 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/pcm-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/pcm-as3525.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c index bb91bfad65..20c34bba36 100644 --- a/firmware/target/arm/as3525/pcm-as3525.c +++ b/firmware/target/arm/as3525/pcm-as3525.c @@ -263,7 +263,7 @@ static inline void mono2stereo(int16_t *end) { if(audio_channels != 1) /* only for microphone */ return; -#if 0 + /* load pointer in a register and avoid updating it in each loop */ register int16_t *samples = mono_samples; @@ -273,19 +273,6 @@ static inline void mono2stereo(int16_t *end) } while(samples != end); mono_samples = samples; /* update pointer */ -#else - /* gcc doesn't use pre indexing : let's save 1 cycle */ - int16_t left; - asm ( - "1: ldrh %0, [%1], #2 \n" // load 1 sample of the left-channel - " strh %0, [%1], #2 \n" // copy it in the right-channel - " cmp %1, %2 \n" // are we finished? - " bne 1b \n" - : "=r"(left), "+r"(mono_samples) - : "r"(end) - : "memory" - ); -#endif /* C / ASM */ } #endif /* CONFIG_CPU == AS3525 */ |