forked from len0rd/rockbox
Mandelbrot: slight speedup on coldfire targets. Only noticeable at high iteration depths with full precision.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13631 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cee61b57c8
commit
bb12e55989
1 changed files with 11 additions and 11 deletions
|
@ -299,18 +299,18 @@ static inline long muls32_asr26(long a, long b)
|
||||||
long r, t1;
|
long r, t1;
|
||||||
asm (
|
asm (
|
||||||
"mac.l %[a], %[b], %%acc0 \n" /* multiply */
|
"mac.l %[a], %[b], %%acc0 \n" /* multiply */
|
||||||
"mulu.l %[a],%[b] \n" /* get lower half */
|
"move.l %%accext01, %[t1] \n" /* get low part */
|
||||||
"movclr.l %%acc0,%[r] \n" /* get higher half */
|
"movclr.l %%acc0, %[r] \n" /* get high part */
|
||||||
"asl.l #5, %[r] \n" /* hi <<= 5, plus one free */
|
"asl.l #5, %[r] \n" /* hi <<= 5, plus one free */
|
||||||
"moveq.l #26,%[t1] \n"
|
"lsr.l #3, %[t1] \n" /* lo >>= 3 */
|
||||||
"lsr.l %[t1],%[b] \n" /* (unsigned)lo >>= 26 */
|
"and.l #0x1f, %[t1] \n" /* mask out unrelated bits */
|
||||||
"or.l %[b],%[r] \n" /* combine result */
|
"or.l %[t1], %[r] \n" /* combine result */
|
||||||
: /* outputs */
|
: /* outputs */
|
||||||
[r]"=&d"(r),
|
[r] "=d"(r),
|
||||||
[t1]"=&d"(t1),
|
[t1]"=d"(t1)
|
||||||
[b] "+d" (b)
|
|
||||||
: /* inputs */
|
: /* inputs */
|
||||||
[a] "d" (a)
|
[a] "d" (a),
|
||||||
|
[b] "d" (b)
|
||||||
);
|
);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue