diff options
author | Nils Wallménius <nils@rockbox.org> | 2011-06-08 10:35:27 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2011-06-08 10:35:27 +0000 |
commit | d5ceb4ce2b5ee8f81edfab4fb903c10353d788e5 (patch) | |
tree | 1193ac688f8cc2208ea8f2668b92f7cf581bb457 /apps/codecs/lib/asm_arm.h | |
parent | 6672766dfe374e26ee20efe010591b64529b2a0f (diff) | |
download | rockbox-d5ceb4ce2b5ee8f81edfab4fb903c10353d788e5.tar.gz rockbox-d5ceb4ce2b5ee8f81edfab4fb903c10353d788e5.zip |
codeclib: make selective inclusion of macros and inline functions from the codeclib_misc.h header easier and clean out some old libtremor stuff.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29985 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/lib/asm_arm.h')
-rw-r--r-- | apps/codecs/lib/asm_arm.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/codecs/lib/asm_arm.h b/apps/codecs/lib/asm_arm.h index 629e47b3bd..54ce4b0d98 100644 --- a/apps/codecs/lib/asm_arm.h +++ b/apps/codecs/lib/asm_arm.h | |||
@@ -16,9 +16,7 @@ | |||
16 | ********************************************************************/ | 16 | ********************************************************************/ |
17 | #ifdef CPU_ARM | 17 | #ifdef CPU_ARM |
18 | 18 | ||
19 | #if !defined(_V_WIDE_MATH) && !defined(_LOW_ACCURACY_) | 19 | #define INCL_OPTIMIZED_MULT32 |
20 | #define _V_WIDE_MATH | ||
21 | |||
22 | #if ARM_ARCH >= 6 | 20 | #if ARM_ARCH >= 6 |
23 | static inline int32_t MULT32(int32_t x, int32_t y) { | 21 | static inline int32_t MULT32(int32_t x, int32_t y) { |
24 | int32_t hi; | 22 | int32_t hi; |
@@ -37,10 +35,12 @@ static inline int32_t MULT32(int32_t x, int32_t y) { | |||
37 | } | 35 | } |
38 | #endif | 36 | #endif |
39 | 37 | ||
38 | #define INCL_OPTIMIZED_MULT31 | ||
40 | static inline int32_t MULT31(int32_t x, int32_t y) { | 39 | static inline int32_t MULT31(int32_t x, int32_t y) { |
41 | return MULT32(x,y)<<1; | 40 | return MULT32(x,y)<<1; |
42 | } | 41 | } |
43 | 42 | ||
43 | #define INCL_OPTIMIZED_MULT31_SHIFT15 | ||
44 | static inline int32_t MULT31_SHIFT15(int32_t x, int32_t y) { | 44 | static inline int32_t MULT31_SHIFT15(int32_t x, int32_t y) { |
45 | int32_t lo,hi; | 45 | int32_t lo,hi; |
46 | asm volatile("smull %0, %1, %2, %3\n\t" | 46 | asm volatile("smull %0, %1, %2, %3\n\t" |
@@ -52,6 +52,7 @@ static inline int32_t MULT31_SHIFT15(int32_t x, int32_t y) { | |||
52 | return(hi); | 52 | return(hi); |
53 | } | 53 | } |
54 | 54 | ||
55 | #define INCL_OPTIMIZED_MULT31_SHIFT16 | ||
55 | static inline int32_t MULT31_SHIFT16(int32_t x, int32_t y) { | 56 | static inline int32_t MULT31_SHIFT16(int32_t x, int32_t y) { |
56 | int32_t lo,hi; | 57 | int32_t lo,hi; |
57 | asm volatile("smull %0, %1, %2, %3\n\t" | 58 | asm volatile("smull %0, %1, %2, %3\n\t" |
@@ -63,6 +64,7 @@ static inline int32_t MULT31_SHIFT16(int32_t x, int32_t y) { | |||
63 | return(hi); | 64 | return(hi); |
64 | } | 65 | } |
65 | 66 | ||
67 | #define INCL_OPTIMIZED_XPROD32 | ||
66 | #define XPROD32(a, b, t, v, x, y) \ | 68 | #define XPROD32(a, b, t, v, x, y) \ |
67 | { \ | 69 | { \ |
68 | int32_t l; \ | 70 | int32_t l; \ |
@@ -75,6 +77,8 @@ static inline int32_t MULT31_SHIFT16(int32_t x, int32_t y) { | |||
75 | : "r" ((a)), "r" ((b)), "r" ((t)), "r" ((v)) ); \ | 77 | : "r" ((a)), "r" ((b)), "r" ((t)), "r" ((v)) ); \ |
76 | } | 78 | } |
77 | 79 | ||
80 | #define INCL_OPTIMIZED_XPROD31_R | ||
81 | #define INCL_OPTIMIZED_XNPROD31_R | ||
78 | #if ARM_ARCH >= 6 | 82 | #if ARM_ARCH >= 6 |
79 | /* These may yield slightly different result from the macros below | 83 | /* These may yield slightly different result from the macros below |
80 | because only the high 32 bits of the multiplications are accumulated while | 84 | because only the high 32 bits of the multiplications are accumulated while |
@@ -134,6 +138,7 @@ static inline int32_t MULT31_SHIFT16(int32_t x, int32_t y) { | |||
134 | } | 138 | } |
135 | #endif | 139 | #endif |
136 | 140 | ||
141 | #define INCL_OPTIMIZED_XPROD31 | ||
137 | static inline void XPROD31(int32_t a, int32_t b, | 142 | static inline void XPROD31(int32_t a, int32_t b, |
138 | int32_t t, int32_t v, | 143 | int32_t t, int32_t v, |
139 | int32_t *x, int32_t *y) | 144 | int32_t *x, int32_t *y) |
@@ -144,6 +149,7 @@ static inline void XPROD31(int32_t a, int32_t b, | |||
144 | *y = _y1; | 149 | *y = _y1; |
145 | } | 150 | } |
146 | 151 | ||
152 | #define INCL_OPTIMIZED_XNPROD31 | ||
147 | static inline void XNPROD31(int32_t a, int32_t b, | 153 | static inline void XNPROD31(int32_t a, int32_t b, |
148 | int32_t t, int32_t v, | 154 | int32_t t, int32_t v, |
149 | int32_t *x, int32_t *y) | 155 | int32_t *x, int32_t *y) |
@@ -261,7 +267,6 @@ void vect_mult_bw(int32_t *data, int32_t *window, int n) | |||
261 | 267 | ||
262 | #endif | 268 | #endif |
263 | 269 | ||
264 | #endif | ||
265 | /* not used anymore */ | 270 | /* not used anymore */ |
266 | /* | 271 | /* |
267 | #ifndef _V_CLIP_MATH | 272 | #ifndef _V_CLIP_MATH |
@@ -282,11 +287,6 @@ static inline int32_t CLIP_TO_15(int32_t x) { | |||
282 | 287 | ||
283 | #endif | 288 | #endif |
284 | */ | 289 | */ |
285 | #ifndef _V_LSP_MATH_ASM | ||
286 | #define _V_LSP_MATH_ASM | ||
287 | |||
288 | 290 | ||
289 | |||
290 | #endif | ||
291 | #endif | 291 | #endif |
292 | 292 | ||