summaryrefslogtreecommitdiff
path: root/apps/codecs/lib/asm_arm.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/lib/asm_arm.h')
-rw-r--r--apps/codecs/lib/asm_arm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/codecs/lib/asm_arm.h b/apps/codecs/lib/asm_arm.h
index c0f9440450..629e47b3bd 100644
--- a/apps/codecs/lib/asm_arm.h
+++ b/apps/codecs/lib/asm_arm.h
@@ -52,6 +52,17 @@ static inline int32_t MULT31_SHIFT15(int32_t x, int32_t y) {
52 return(hi); 52 return(hi);
53} 53}
54 54
55static inline int32_t MULT31_SHIFT16(int32_t x, int32_t y) {
56 int32_t lo,hi;
57 asm volatile("smull %0, %1, %2, %3\n\t"
58 "movs %0, %0, lsr #16\n\t"
59 "adc %1, %0, %1, lsl #16\n\t"
60 : "=&r"(lo),"=&r"(hi)
61 : "r"(x),"r"(y)
62 : "cc" );
63 return(hi);
64}
65
55#define XPROD32(a, b, t, v, x, y) \ 66#define XPROD32(a, b, t, v, x, y) \
56{ \ 67{ \
57 int32_t l; \ 68 int32_t l; \