diff options
-rw-r--r-- | apps/codecs/lib/asm_mcf5249.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/apps/codecs/lib/asm_mcf5249.h b/apps/codecs/lib/asm_mcf5249.h index e3dc8dd684..88b7961431 100644 --- a/apps/codecs/lib/asm_mcf5249.h +++ b/apps/codecs/lib/asm_mcf5249.h | |||
@@ -19,8 +19,6 @@ | |||
19 | ****************************************************************************/ | 19 | ****************************************************************************/ |
20 | /* asm routines for wide math on the MCF5249 */ | 20 | /* asm routines for wide math on the MCF5249 */ |
21 | 21 | ||
22 | //#include "os_types.h" | ||
23 | |||
24 | #if defined(CPU_COLDFIRE) | 22 | #if defined(CPU_COLDFIRE) |
25 | 23 | ||
26 | /* attribute for 16-byte alignment */ | 24 | /* attribute for 16-byte alignment */ |
@@ -43,7 +41,6 @@ static inline int32_t MULT32(int32_t x, int32_t y) { | |||
43 | } | 41 | } |
44 | 42 | ||
45 | static inline int32_t MULT31(int32_t x, int32_t y) { | 43 | static inline int32_t MULT31(int32_t x, int32_t y) { |
46 | |||
47 | asm volatile ("mac.l %[x], %[y], %%acc0;" /* multiply */ | 44 | asm volatile ("mac.l %[x], %[y], %%acc0;" /* multiply */ |
48 | "movclr.l %%acc0, %[x];" /* move and clear */ | 45 | "movclr.l %%acc0, %[x];" /* move and clear */ |
49 | : [x] "+&r" (x) | 46 | : [x] "+&r" (x) |
@@ -52,7 +49,6 @@ static inline int32_t MULT31(int32_t x, int32_t y) { | |||
52 | return x; | 49 | return x; |
53 | } | 50 | } |
54 | 51 | ||
55 | |||
56 | static inline int32_t MULT31_SHIFT15(int32_t x, int32_t y) { | 52 | static inline int32_t MULT31_SHIFT15(int32_t x, int32_t y) { |
57 | int32_t r; | 53 | int32_t r; |
58 | 54 | ||
@@ -70,7 +66,6 @@ static inline int32_t MULT31_SHIFT15(int32_t x, int32_t y) { | |||
70 | return r; | 66 | return r; |
71 | } | 67 | } |
72 | 68 | ||
73 | |||
74 | static inline | 69 | static inline |
75 | void XPROD31(int32_t a, int32_t b, | 70 | void XPROD31(int32_t a, int32_t b, |
76 | int32_t t, int32_t v, | 71 | int32_t t, int32_t v, |
@@ -90,7 +85,6 @@ void XPROD31(int32_t a, int32_t b, | |||
90 | : "cc", "memory"); | 85 | : "cc", "memory"); |
91 | } | 86 | } |
92 | 87 | ||
93 | |||
94 | static inline | 88 | static inline |
95 | void XNPROD31(int32_t a, int32_t b, | 89 | void XNPROD31(int32_t a, int32_t b, |
96 | int32_t t, int32_t v, | 90 | int32_t t, int32_t v, |
@@ -110,7 +104,6 @@ void XNPROD31(int32_t a, int32_t b, | |||
110 | : "cc", "memory"); | 104 | : "cc", "memory"); |
111 | } | 105 | } |
112 | 106 | ||
113 | |||
114 | #if 0 /* canonical Tremor definition */ | 107 | #if 0 /* canonical Tremor definition */ |
115 | #define XPROD32(_a, _b, _t, _v, _x, _y) \ | 108 | #define XPROD32(_a, _b, _t, _v, _x, _y) \ |
116 | { (_x)=MULT32(_a,_t)+MULT32(_b,_v); \ | 109 | { (_x)=MULT32(_a,_t)+MULT32(_b,_v); \ |
@@ -140,7 +133,7 @@ void XNPROD31(int32_t a, int32_t b, | |||
140 | /* asm versions of vector operations for block.c, window.c */ | 133 | /* asm versions of vector operations for block.c, window.c */ |
141 | /* assumes MAC is initialized & accumulators cleared */ | 134 | /* assumes MAC is initialized & accumulators cleared */ |
142 | static inline | 135 | static inline |
143 | void vect_add(int32_t *x, int32_t *y, int n) | 136 | void vect_add(int32_t *x, const int32_t *y, int n) |
144 | { | 137 | { |
145 | /* align to 16 bytes */ | 138 | /* align to 16 bytes */ |
146 | while(n>0 && (int)x&15) { | 139 | while(n>0 && (int)x&15) { |
@@ -199,7 +192,6 @@ void vect_copy(int32_t *x, int32_t *y, int n) | |||
199 | } | 192 | } |
200 | } | 193 | } |
201 | 194 | ||
202 | |||
203 | static inline | 195 | static inline |
204 | void vect_mult_fw(int32_t *data, int32_t *window, int n) | 196 | void vect_mult_fw(int32_t *data, int32_t *window, int n) |
205 | { | 197 | { |
@@ -325,3 +317,4 @@ static inline int32_t CLIP_TO_15(register int32_t x) { | |||
325 | #else | 317 | #else |
326 | #define LINE_ATTR | 318 | #define LINE_ATTR |
327 | #endif | 319 | #endif |
320 | |||