summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-06-14 22:50:21 +0000
committerJens Arnold <amiconn@rockbox.org>2007-06-14 22:50:21 +0000
commitbb12e55989e360662d606c016db3471484d5a694 (patch)
treee41370618700f6a4bf4fcb749ab7e34077aa5810
parentcee61b57c8459f4e9eb787dd8a5f9507770deb02 (diff)
downloadrockbox-bb12e55989e360662d606c016db3471484d5a694.tar.gz
rockbox-bb12e55989e360662d606c016db3471484d5a694.zip
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
-rw-r--r--apps/plugins/mandelbrot.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c
index fe920cebd4..b1e8587764 100644
--- a/apps/plugins/mandelbrot.c
+++ b/apps/plugins/mandelbrot.c
@@ -298,19 +298,19 @@ static inline long muls32_asr26(long a, long b)
{
long r, t1;
asm (
- "mac.l %[a],%[b],%%acc0\n" /* multiply */
- "mulu.l %[a],%[b] \n" /* get lower half */
- "movclr.l %%acc0,%[r] \n" /* get higher half */
- "asl.l #5,%[r] \n" /* hi <<= 5, plus one free */
- "moveq.l #26,%[t1] \n"
- "lsr.l %[t1],%[b] \n" /* (unsigned)lo >>= 26 */
- "or.l %[b],%[r] \n" /* combine result */
+ "mac.l %[a], %[b], %%acc0 \n" /* multiply */
+ "move.l %%accext01, %[t1] \n" /* get low part */
+ "movclr.l %%acc0, %[r] \n" /* get high part */
+ "asl.l #5, %[r] \n" /* hi <<= 5, plus one free */
+ "lsr.l #3, %[t1] \n" /* lo >>= 3 */
+ "and.l #0x1f, %[t1] \n" /* mask out unrelated bits */
+ "or.l %[t1], %[r] \n" /* combine result */
: /* outputs */
- [r]"=&d"(r),
- [t1]"=&d"(t1),
- [b] "+d" (b)
+ [r] "=d"(r),
+ [t1]"=d"(t1)
: /* inputs */
- [a] "d" (a)
+ [a] "d" (a),
+ [b] "d" (b)
);
return r;
}