Make Tremor usable on ARM targets.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8475 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thom Johansen 2006-01-28 21:21:21 +00:00
parent b9e10d9a07
commit 5947e49f46
3 changed files with 17 additions and 16 deletions

View file

@ -46,22 +46,17 @@ static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
#define MB() asm volatile ("" : : : "memory") #define MB() asm volatile ("" : : : "memory")
static inline void XPROD32(ogg_int32_t a, ogg_int32_t b, #define XPROD32(a, b, t, v, x, y) \
ogg_int32_t t, ogg_int32_t v, { \
ogg_int32_t *x, ogg_int32_t *y) long l; \
{ asm( "smull %0, %1, %4, %6\n\t" \
int x1, y1, l; "smlal %0, %1, %5, %7\n\t" \
asm( "smull %0, %1, %4, %6\n\t" "rsb %3, %4, #0\n\t" \
"smlal %0, %1, %5, %7\n\t" "smull %0, %2, %5, %6\n\t" \
"rsb %3, %4, #0\n\t" "smlal %0, %2, %3, %7" \
"smull %0, %2, %5, %6\n\t" : "=&r" (l), "=&r" (x), "=&r" (y), "=r" ((a)) \
"smlal %0, %2, %3, %7" : "3" ((a)), "r" ((b)), "r" ((t)), "r" ((v)) \
: "=&r" (l), "=&r" (x1), "=&r" (y1), "=r" (a) : "cc" ); \
: "3" (a), "r" (b), "r" (t), "r" (v)
: "cc" );
*x = x1;
MB();
*y = y1;
} }
static inline void XPROD31(ogg_int32_t a, ogg_int32_t b, static inline void XPROD31(ogg_int32_t a, ogg_int32_t b,

View file

@ -1,4 +1,8 @@
#include "../codec.h" #include "../codec.h"
#ifdef CPU_ARM
#define _ARM_ASSEM_
#endif
#ifdef ROCKBOX_BIG_ENDIAN #ifdef ROCKBOX_BIG_ENDIAN
#define BIG_ENDIAN 1 #define BIG_ENDIAN 1
#define LITTLE_ENDIAN 0 #define LITTLE_ENDIAN 0

View file

@ -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]; ogg_int32_t wi=icos[k];
#ifdef _V_LSP_MATH_ASM #ifdef _V_LSP_MATH_ASM
(void)shift; /* kill warnings */
(void)j;
lsp_loop_asm(&qi,&pi,&qexp,ilsp,wi,m); lsp_loop_asm(&qi,&pi,&qexp,ilsp,wi,m);
pi=((pi*pi)>>16); pi=((pi*pi)>>16);