summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/codecs/libwmapro/wmapro_math.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/apps/codecs/libwmapro/wmapro_math.h b/apps/codecs/libwmapro/wmapro_math.h
index 3672c0103b..06df737bc0 100644
--- a/apps/codecs/libwmapro/wmapro_math.h
+++ b/apps/codecs/libwmapro/wmapro_math.h
@@ -238,6 +238,38 @@ static inline void vector_fixmul_window(int32_t *dst, const int32_t *src0,
238 : [dst]"+r"(dst), [src]"+r"(src) \ 238 : [dst]"+r"(dst), [src]"+r"(src) \
239 : [mul]"r"(mul) \ 239 : [mul]"r"(mul) \
240 : "r0", "r1", "r2", "r3", "r4", "r5", "memory"); 240 : "r0", "r1", "r2", "r3", "r4", "r5", "memory");
241#elif defined (CPU_COLDFIRE)
242 #define VECT_MUL_SCALAR_KERNEL(dst, src, mul) \
243 int32_t tmp; \
244 asm volatile ( \
245 "movem.l (%[src]), %%d0-%%d3 \n\t" \
246 "mac.l %[mul], %%d0, %%acc0 \n\t" \
247 "mac.l %[mul], %%d1, %%acc1 \n\t" \
248 "mac.l %[mul], %%d2, %%acc2 \n\t" \
249 "mac.l %[mul], %%d3, %%acc3 \n\t" \
250 "move.l %%accext01, %[tmp] \n\t" \
251 "movclr.l %%acc0, %%d0 \n\t" \
252 "movclr.l %%acc1, %%d1 \n\t" \
253 "lsl.l #7, %%d0 \n\t" \
254 "move.b %[tmp], %%d0 \n\t" \
255 "swap %[tmp] \n\t" \
256 "lsl.l #7, %%d1 \n\t" \
257 "move.b %[tmp], %%d1 \n\t" \
258 "move.l %%accext23, %[tmp] \n\t" \
259 "movclr.l %%acc2, %%d2 \n\t" \
260 "movclr.l %%acc3, %%d3 \n\t" \
261 "lsl.l #7, %%d2 \n\t" \
262 "move.b %[tmp], %%d2 \n\t" \
263 "swap %[tmp] \n\t" \
264 "lsl.l #7, %%d3 \n\t" \
265 "move.b %[tmp], %%d3 \n\t" \
266 "movem.l %%d0-%%d3, (%[dst]) \n\t" \
267 "lea.l (4*4, %[src]), %[src]\n\t" \
268 "lea.l (4*4, %[dst]), %[dst]\n\t" \
269 : [dst] "+a" (dst), [src] "+a" (src),\
270 [tmp] "=d" (tmp) \
271 : [mul] "r" (mul) \
272 : "d0", "d1", "d2", "d3", "memory", "cc");
241#else 273#else
242 #define VECT_MUL_SCALAR_KERNEL(dst, src, mul) \ 274 #define VECT_MUL_SCALAR_KERNEL(dst, src, mul) \
243 dst[i ] = fixmul24(src[i ], mul); \ 275 dst[i ] = fixmul24(src[i ], mul); \