From 29ab31e8f1c68dd89dad1e9a92fe3c8a8dd223a9 Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Thu, 20 Apr 2006 19:39:56 +0000 Subject: 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 --- apps/plugins/doom/m_fixed.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/plugins/doom/m_fixed.h') 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 -- cgit v1.2.3