summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/m_fixed.h
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2006-04-20 19:39:56 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2006-04-20 19:39:56 +0000
commit29ab31e8f1c68dd89dad1e9a92fe3c8a8dd223a9 (patch)
tree304b247322f0adefca4c27d1bf7c5a8cfe1a44e8 /apps/plugins/doom/m_fixed.h
parent9e9921b08731367ebcaf19976d8e4c6c2534a016 (diff)
Optimizations for doom: coldfire asm drawspan routine = not much, fixed point multiply changes = not much, H300 asm lcd update = some, IRAM sound updates and simplifications = more
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9747 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/doom/m_fixed.h')
-rw-r--r--apps/plugins/doom/m_fixed.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/plugins/doom/m_fixed.h b/apps/plugins/doom/m_fixed.h
index 3c922e8f50..e29933befd 100644
--- a/apps/plugins/doom/m_fixed.h
+++ b/apps/plugins/doom/m_fixed.h
@@ -47,15 +47,15 @@ inline static int FixedMul( int a, int b )
#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
// Code contributed by Thom Johansen
register int result;
- asm volatile (
+ asm (
"mac.l %[x],%[y],%%acc0 \n" /* multiply */
"move.l %[y],%%d2 \n"
"mulu.l %[x],%%d2 \n" /* get lower half, avoid emac stall */
"movclr.l %%acc0,%[result] \n" /* get higher half */
- "moveq.l #15,%%d1 \n"
- "asl.l %%d1,%[result] \n" /* hi <<= 15, plus one free */
- "moveq.l #16,%%d1 \n"
- "lsr.l %%d1,%%d2 \n" /* (unsigned)lo >>= 16 */
+ "asl.l #8,%[result] \n" /* hi <<= 15, plus one free */
+ "asl.l #7,%[result] \n" /* hi <<= 15, plus one free */
+ "lsr.l #8,%%d2 \n" /* (unsigned)lo >>= 16 */
+ "lsr.l #8,%%d2 \n" /* (unsigned)lo >>= 16 */
"or.l %%d2 ,%[result] \n" /* combine result */
: /* outputs */
[result]"=&d"(result)
@@ -63,7 +63,7 @@ inline static int FixedMul( int a, int b )
[x] "d" (a),
[y] "d" (b)
: /* clobbers */
- "d1", "d2"
+ "d2"
);
return result;
#else