From 425725edb087bc606bfe4ca4fe9e26008ef49b6a Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Wed, 26 Sep 2012 11:21:25 +0200 Subject: opus: improve cf MULT16_32_Q15 by giving the compiler more freedom saves about 3MHz when decoding a 64kbps test file Change-Id: I10f47173ccb78e60e364662220d1db2f78dd5fdd --- lib/rbcodec/codecs/libopus/celt/fixed_generic.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/rbcodec/codecs/libopus/celt/fixed_generic.h b/lib/rbcodec/codecs/libopus/celt/fixed_generic.h index d2271e7972..bc6820fa21 100644 --- a/lib/rbcodec/codecs/libopus/celt/fixed_generic.h +++ b/lib/rbcodec/codecs/libopus/celt/fixed_generic.h @@ -45,14 +45,13 @@ #if defined(CPU_COLDFIRE) static inline int32_t MULT16_32_Q15(int32_t a, int32_t b) { - asm volatile ("lsl.l #8, %[a];" - "lsl.l #8, %[a];" - "mac.l %[a], %[b], %%acc0;" - "movclr.l %%acc0, %[a];" - : [a] "+d" (a) - : [b] "d" (b) + int32_t r; + asm volatile ("mac.l %[a], %[b], %%acc0;" + "movclr.l %%acc0, %[r];" + : [r] "=r" (r) + : [a] "r" (a<<16), [b] "r" (b) : "cc"); - return a; + return r; } #elif defined(CPU_ARM) -- cgit v1.2.3