diff options
-rw-r--r-- | apps/codecs/libwmapro/wmapro_math.h | 7 |
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 @@ | |||
53 | lo; \ | 53 | lo; \ |
54 | }) | 54 | }) |
55 | 55 | ||
56 | /* Calculates: result = (X*Y)>>31 */ | 56 | /* Calculates: result = (X*Y)>>31, loose 1 bit precision */ |
57 | #define fixmul31(X,Y) \ | 57 | #define fixmul31(X,Y) \ |
58 | ({ \ | 58 | ({ \ |
59 | int32_t lo; \ | 59 | int32_t lo; \ |
60 | int32_t hi; \ | 60 | int32_t hi; \ |
61 | asm volatile ( \ | 61 | asm volatile ( \ |
62 | "smull %[lo], %[hi], %[x], %[y] \n\t" /* multiply */ \ | 62 | "smull %[lo], %[hi], %[x], %[y] \n\t" /* multiply */ \ |
63 | "mov %[lo], %[lo], lsr #31 \n\t" /* lo >>= 31 */ \ | 63 | "mov %[hi], %[hi], lsl #1" /* hi <<= 1 */ \ |
64 | "orr %[lo], %[lo], %[hi], lsl #1" /* lo |= (hi << 1) */ \ | ||
65 | : [lo]"=&r"(lo), [hi]"=&r"(hi) \ | 64 | : [lo]"=&r"(lo), [hi]"=&r"(hi) \ |
66 | : [x]"r"(X), [y]"r"(Y)); \ | 65 | : [x]"r"(X), [y]"r"(Y)); \ |
67 | lo; \ | 66 | hi; \ |
68 | }) | 67 | }) |
69 | #elif defined(CPU_COLDFIRE) | 68 | #elif defined(CPU_COLDFIRE) |
70 | /* Calculates: result = (X*Y)>>Z */ | 69 | /* Calculates: result = (X*Y)>>Z */ |