forked from len0rd/rockbox
opus: cf inline asm for MULT32_32_Q31
speeds up decoding of a 64kbps test file by 2MHz on h300 Change-Id: I437d05278fe1c495715cf0e3477f9960d1df9d3a
This commit is contained in:
parent
2119f75af3
commit
3ac0fc7c90
1 changed files with 13 additions and 1 deletions
|
@ -71,7 +71,19 @@ static inline int32_t MULT16_32_Q15(int32_t a, int32_t b)
|
||||||
#define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000ffff)),15))
|
#define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000ffff)),15))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CPU_ARM)
|
#if defined(CPU_COLDFIRE)
|
||||||
|
static inline int32_t MULT32_32_Q31(int32_t a, int32_t b)
|
||||||
|
{
|
||||||
|
int32_t r;
|
||||||
|
asm volatile ("mac.l %[a], %[b], %%acc0;"
|
||||||
|
"movclr.l %%acc0, %[r];"
|
||||||
|
: [r] "=r" (r)
|
||||||
|
: [a] "r" (a), [b] "r" (b)
|
||||||
|
: "cc");
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif defined(CPU_ARM)
|
||||||
static inline int32_t MULT32_32_Q31(int32_t a, int32_t b)
|
static inline int32_t MULT32_32_Q31(int32_t a, int32_t b)
|
||||||
{
|
{
|
||||||
int32_t lo, hi;
|
int32_t lo, hi;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue