diff options
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/libwma/wmadeci.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index ee06033d85..c064bf0e04 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c | |||
@@ -97,27 +97,27 @@ static fixed64 Fixed32To64(fixed32 x) | |||
97 | __result; \ | 97 | __result; \ |
98 | }) | 98 | }) |
99 | #elif defined(CPU_COLDFIRE) | 99 | #elif defined(CPU_COLDFIRE) |
100 | static inline int32_t fixmul32(int32_t x, int32_t y) | 100 | static inline int32_t fixmul32(int32_t x, int32_t y) |
101 | { | 101 | { |
102 | int32_t t1, t2; | 102 | #if PRECISION != 16 |
103 | asm volatile ( | 103 | #warning Coldfire fixmul32() only works for PRECISION == 16 |
104 | "mac.l %[x],%[y],%%acc0\n" /* multiply */ | 104 | #endif |
105 | "mulu.l %[y],%[x] \n" /* get lower half, avoid emac stall */ | 105 | int32_t t1; |
106 | "movclr.l %%acc0,%[t1] \n" /* get higher half */ | 106 | asm ( |
107 | "moveq.l #15,%[t2] \n" | 107 | "mac.l %[x], %[y], %%acc0 \n" /* multiply */ |
108 | "asl.l %[t2],%[t1] \n" /* hi <<= 15, plus one free */ | 108 | "mulu.l %[y], %[x] \n" /* get lower half, avoid emac stall */ |
109 | "moveq.l #16,%[t2] \n" | 109 | "movclr.l %%acc0, %[t1] \n" /* get higher half */ |
110 | "lsr.l %[t2],%[x] \n" /* (unsigned)lo >>= 16 */ | 110 | "lsr.l #1, %[t1] \n" |
111 | "or.l %[x],%[t1] \n" /* combine result */ | 111 | "move.w %[t1], %[x] \n" |
112 | : /* outputs */ | 112 | "swap %[x] \n" |
113 | [t1]"=&d"(t1), | 113 | : /* outputs */ |
114 | [t2]"=&d"(t2), | 114 | [t1]"=&d"(t1), |
115 | [x] "+d" (x) | 115 | [x] "+d" (x) |
116 | : /* inputs */ | 116 | : /* inputs */ |
117 | [y] "d" (y) | 117 | [y] "d" (y) |
118 | ); | 118 | ); |
119 | return t1; | 119 | return x; |
120 | } | 120 | } |
121 | #else | 121 | #else |
122 | fixed32 fixmul32(fixed32 x, fixed32 y) | 122 | fixed32 fixmul32(fixed32 x, fixed32 y) |
123 | { | 123 | { |