summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libwmapro/wmapro_math.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libwmapro/wmapro_math.h')
-rw-r--r--apps/codecs/libwmapro/wmapro_math.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/codecs/libwmapro/wmapro_math.h b/apps/codecs/libwmapro/wmapro_math.h
index a34a5a8d5a..c78d6b627f 100644
--- a/apps/codecs/libwmapro/wmapro_math.h
+++ b/apps/codecs/libwmapro/wmapro_math.h
@@ -53,18 +53,17 @@
lo; \
})
- /* Calculates: result = (X*Y)>>31 */
+ /* Calculates: result = (X*Y)>>31, loose 1 bit precision */
#define fixmul31(X,Y) \
({ \
int32_t lo; \
int32_t hi; \
asm volatile ( \
"smull %[lo], %[hi], %[x], %[y] \n\t" /* multiply */ \
- "mov %[lo], %[lo], lsr #31 \n\t" /* lo >>= 31 */ \
- "orr %[lo], %[lo], %[hi], lsl #1" /* lo |= (hi << 1) */ \
+ "mov %[hi], %[hi], lsl #1" /* hi <<= 1 */ \
: [lo]"=&r"(lo), [hi]"=&r"(hi) \
: [x]"r"(X), [y]"r"(Y)); \
- lo; \
+ hi; \
})
#elif defined(CPU_COLDFIRE)
/* Calculates: result = (X*Y)>>Z */