1
0
Fork 0
forked from len0rd/rockbox

opus: improve cf MULT16_32_Q15 by giving the compiler more freedom

saves about 3MHz when decoding a 64kbps test file

Change-Id: I10f47173ccb78e60e364662220d1db2f78dd5fdd
This commit is contained in:
Nils Wallménius 2012-09-26 11:21:25 +02:00
parent 5f60590e80
commit 425725edb0

View file

@ -45,14 +45,13 @@
#if defined(CPU_COLDFIRE) #if defined(CPU_COLDFIRE)
static inline int32_t MULT16_32_Q15(int32_t a, int32_t b) static inline int32_t MULT16_32_Q15(int32_t a, int32_t b)
{ {
asm volatile ("lsl.l #8, %[a];" int32_t r;
"lsl.l #8, %[a];" asm volatile ("mac.l %[a], %[b], %%acc0;"
"mac.l %[a], %[b], %%acc0;" "movclr.l %%acc0, %[r];"
"movclr.l %%acc0, %[a];" : [r] "=r" (r)
: [a] "+d" (a) : [a] "r" (a<<16), [b] "r" (b)
: [b] "d" (b)
: "cc"); : "cc");
return a; return r;
} }
#elif defined(CPU_ARM) #elif defined(CPU_ARM)