diff options
Diffstat (limited to 'apps/plugins/doom/m_fixed.h')
-rw-r--r-- | apps/plugins/doom/m_fixed.h | 12 |
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 ) | |||
47 | #if defined(CPU_COLDFIRE) && !defined(SIMULATOR) | 47 | #if defined(CPU_COLDFIRE) && !defined(SIMULATOR) |
48 | // Code contributed by Thom Johansen | 48 | // Code contributed by Thom Johansen |
49 | register int result; | 49 | register int result; |
50 | asm volatile ( | 50 | asm ( |
51 | "mac.l %[x],%[y],%%acc0 \n" /* multiply */ | 51 | "mac.l %[x],%[y],%%acc0 \n" /* multiply */ |
52 | "move.l %[y],%%d2 \n" | 52 | "move.l %[y],%%d2 \n" |
53 | "mulu.l %[x],%%d2 \n" /* get lower half, avoid emac stall */ | 53 | "mulu.l %[x],%%d2 \n" /* get lower half, avoid emac stall */ |
54 | "movclr.l %%acc0,%[result] \n" /* get higher half */ | 54 | "movclr.l %%acc0,%[result] \n" /* get higher half */ |
55 | "moveq.l #15,%%d1 \n" | 55 | "asl.l #8,%[result] \n" /* hi <<= 15, plus one free */ |
56 | "asl.l %%d1,%[result] \n" /* hi <<= 15, plus one free */ | 56 | "asl.l #7,%[result] \n" /* hi <<= 15, plus one free */ |
57 | "moveq.l #16,%%d1 \n" | 57 | "lsr.l #8,%%d2 \n" /* (unsigned)lo >>= 16 */ |
58 | "lsr.l %%d1,%%d2 \n" /* (unsigned)lo >>= 16 */ | 58 | "lsr.l #8,%%d2 \n" /* (unsigned)lo >>= 16 */ |
59 | "or.l %%d2 ,%[result] \n" /* combine result */ | 59 | "or.l %%d2 ,%[result] \n" /* combine result */ |
60 | : /* outputs */ | 60 | : /* outputs */ |
61 | [result]"=&d"(result) | 61 | [result]"=&d"(result) |
@@ -63,7 +63,7 @@ inline static int FixedMul( int a, int b ) | |||
63 | [x] "d" (a), | 63 | [x] "d" (a), |
64 | [y] "d" (b) | 64 | [y] "d" (b) |
65 | : /* clobbers */ | 65 | : /* clobbers */ |
66 | "d1", "d2" | 66 | "d2" |
67 | ); | 67 | ); |
68 | return result; | 68 | return result; |
69 | #else | 69 | #else |