forked from len0rd/rockbox
pdbox: Reverted premature commit of Coldfire optimization.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26560 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3e1847c525
commit
0133a4f052
1 changed files with 0 additions and 17 deletions
|
@ -31,23 +31,6 @@ typedef int t_sample;
|
||||||
lo; \
|
lo; \
|
||||||
})
|
})
|
||||||
#define idiv(a,b) ((((long long) (a) )<<fix1)/(long long) (b) )
|
#define idiv(a,b) ((((long long) (a) )<<fix1)/(long long) (b) )
|
||||||
#elif defined(CPU_COLDFIRE)
|
|
||||||
#define mult(a,b) mult_cf((a),(b))
|
|
||||||
static inline t_fixed mult_cf(t_fixed x, t_fixed y)
|
|
||||||
{
|
|
||||||
t_fixed t1, t2;
|
|
||||||
asm volatile (
|
|
||||||
"mac.l %[x],%[y],%%acc0 \n" /* multiply */
|
|
||||||
"mulu.l %[y],%[x] \n" /* get low half, avoid emac stall */
|
|
||||||
"movclr.l %%acc0,%[t1] \n" /* get higher half */
|
|
||||||
"asl.l %[shl],%[t1] \n" /* hi <<= 13, plus one free */
|
|
||||||
"lsr.l %[shr],%[x] \n" /* (unsigned)lo >>= 18 */
|
|
||||||
"or.l %[x],%[t1] \n" /* combine result */
|
|
||||||
: [t1]"=&d"(t1), [t2]"=&d"(t2), [x]"+d"(x)
|
|
||||||
: [y]"d"(y), [shl]"d"(31-fix1), [shr]"d"(fix1));
|
|
||||||
return t1;
|
|
||||||
}
|
|
||||||
#define idiv(a,b) ((((long long) (a) )<<fix1)/(long long) (b) )
|
|
||||||
#else /* CPU_... */
|
#else /* CPU_... */
|
||||||
#define mult(a,b) (long long)(((long long) (a) * (long long) (b))>>fix1)
|
#define mult(a,b) (long long)(((long long) (a) * (long long) (b))>>fix1)
|
||||||
#define idiv(a,b) ((((long long) (a) )<<fix1)/(long long) (b) )
|
#define idiv(a,b) ((((long long) (a) )<<fix1)/(long long) (b) )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue