summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2006-01-28 21:21:21 +0000
committerThom Johansen <thomj@rockbox.org>2006-01-28 21:21:21 +0000
commit5947e49f467cdf3cf5d2acfcc3c0bd6f97ab29f7 (patch)
tree18b1ebefab61028518ac46e8ef980ed8da2de39b /apps/codecs
parentb9e10d9a07e0cd96de0212ba51f0751e1942f370 (diff)
downloadrockbox-5947e49f467cdf3cf5d2acfcc3c0bd6f97ab29f7.zip
rockbox-5947e49f467cdf3cf5d2acfcc3c0bd6f97ab29f7.tar.gz
rockbox-5947e49f467cdf3cf5d2acfcc3c0bd6f97ab29f7.tar.bz2
rockbox-5947e49f467cdf3cf5d2acfcc3c0bd6f97ab29f7.tar.xz
Make Tremor usable on ARM targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8475 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/Tremor/asm_arm.h27
-rw-r--r--apps/codecs/Tremor/config-tremor.h4
-rw-r--r--apps/codecs/Tremor/floor0.c2
3 files changed, 17 insertions, 16 deletions
diff --git a/apps/codecs/Tremor/asm_arm.h b/apps/codecs/Tremor/asm_arm.h
index 3a3716d..e623ce9 100644
--- a/apps/codecs/Tremor/asm_arm.h
+++ b/apps/codecs/Tremor/asm_arm.h
@@ -46,22 +46,17 @@ static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
#define MB() asm volatile ("" : : : "memory")
-static inline void XPROD32(ogg_int32_t a, ogg_int32_t b,
- ogg_int32_t t, ogg_int32_t v,
- ogg_int32_t *x, ogg_int32_t *y)
-{
- int x1, y1, l;
- asm( "smull %0, %1, %4, %6\n\t"
- "smlal %0, %1, %5, %7\n\t"
- "rsb %3, %4, #0\n\t"
- "smull %0, %2, %5, %6\n\t"
- "smlal %0, %2, %3, %7"
- : "=&r" (l), "=&r" (x1), "=&r" (y1), "=r" (a)
- : "3" (a), "r" (b), "r" (t), "r" (v)
- : "cc" );
- *x = x1;
- MB();
- *y = y1;
+#define XPROD32(a, b, t, v, x, y) \
+{ \
+ long l; \
+ asm( "smull %0, %1, %4, %6\n\t" \
+ "smlal %0, %1, %5, %7\n\t" \
+ "rsb %3, %4, #0\n\t" \
+ "smull %0, %2, %5, %6\n\t" \
+ "smlal %0, %2, %3, %7" \
+ : "=&r" (l), "=&r" (x), "=&r" (y), "=r" ((a)) \
+ : "3" ((a)), "r" ((b)), "r" ((t)), "r" ((v)) \
+ : "cc" ); \
}
static inline void XPROD31(ogg_int32_t a, ogg_int32_t b,
diff --git a/apps/codecs/Tremor/config-tremor.h b/apps/codecs/Tremor/config-tremor.h
index 402feb5..f4a0e1c 100644
--- a/apps/codecs/Tremor/config-tremor.h
+++ b/apps/codecs/Tremor/config-tremor.h
@@ -1,4 +1,8 @@
#include "../codec.h"
+#ifdef CPU_ARM
+#define _ARM_ASSEM_
+#endif
+
#ifdef ROCKBOX_BIG_ENDIAN
#define BIG_ENDIAN 1
#define LITTLE_ENDIAN 0
diff --git a/apps/codecs/Tremor/floor0.c b/apps/codecs/Tremor/floor0.c
index 8ea36ab..c412f71 100644
--- a/apps/codecs/Tremor/floor0.c
+++ b/apps/codecs/Tremor/floor0.c
@@ -173,6 +173,8 @@ void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
ogg_int32_t wi=icos[k];
#ifdef _V_LSP_MATH_ASM
+ (void)shift; /* kill warnings */
+ (void)j;
lsp_loop_asm(&qi,&pi,&qexp,ilsp,wi,m);
pi=((pi*pi)>>16);