diff options
Diffstat (limited to 'apps/codecs/demac/libdemac/vector_math32_armv4.h')
-rw-r--r-- | apps/codecs/demac/libdemac/vector_math32_armv4.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/codecs/demac/libdemac/vector_math32_armv4.h b/apps/codecs/demac/libdemac/vector_math32_armv4.h index 207fca3038..cb5fe9e0ee 100644 --- a/apps/codecs/demac/libdemac/vector_math32_armv4.h +++ b/apps/codecs/demac/libdemac/vector_math32_armv4.h | |||
@@ -27,11 +27,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA | |||
27 | #define FUSED_VECTOR_MATH | 27 | #define FUSED_VECTOR_MATH |
28 | 28 | ||
29 | #if ORDER > 32 | 29 | #if ORDER > 32 |
30 | #define BLOCK_REPEAT "8" | 30 | #define REPEAT_BLOCK(x) x x x x x x x x |
31 | #elif ORDER > 16 | 31 | #elif ORDER > 16 |
32 | #define BLOCK_REPEAT "7" | 32 | #define REPEAT_BLOCK(x) x x x x x x x |
33 | #else | 33 | #else |
34 | #define BLOCK_REPEAT "3" | 34 | #define REPEAT_BLOCK(x) x x x |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | /* Calculate scalarproduct, then add a 2nd vector (fused for performance) */ | 37 | /* Calculate scalarproduct, then add a 2nd vector (fused for performance) */ |
@@ -60,7 +60,7 @@ static inline int32_t vector_sp_add(int32_t* v1, int32_t* f2, int32_t* s2) | |||
60 | "add r3, r3, r7 \n" | 60 | "add r3, r3, r7 \n" |
61 | "stmia %[v1]!, {r0-r3} \n" | 61 | "stmia %[v1]!, {r0-r3} \n" |
62 | #endif | 62 | #endif |
63 | ".rept " BLOCK_REPEAT "\n" | 63 | REPEAT_BLOCK( |
64 | "ldmia %[v1], {r0-r3} \n" | 64 | "ldmia %[v1], {r0-r3} \n" |
65 | "ldmia %[f2]!, {r4-r7} \n" | 65 | "ldmia %[f2]!, {r4-r7} \n" |
66 | "mla %[res], r4, r0, %[res] \n" | 66 | "mla %[res], r4, r0, %[res] \n" |
@@ -73,7 +73,7 @@ static inline int32_t vector_sp_add(int32_t* v1, int32_t* f2, int32_t* s2) | |||
73 | "add r2, r2, r6 \n" | 73 | "add r2, r2, r6 \n" |
74 | "add r3, r3, r7 \n" | 74 | "add r3, r3, r7 \n" |
75 | "stmia %[v1]!, {r0-r3} \n" | 75 | "stmia %[v1]!, {r0-r3} \n" |
76 | ".endr \n" | 76 | ) |
77 | #if ORDER > 32 | 77 | #if ORDER > 32 |
78 | "subs %[cnt], %[cnt], #1 \n" | 78 | "subs %[cnt], %[cnt], #1 \n" |
79 | "bne 1b \n" | 79 | "bne 1b \n" |
@@ -120,7 +120,7 @@ static inline int32_t vector_sp_sub(int32_t* v1, int32_t* f2, int32_t* s2) | |||
120 | "sub r3, r3, r7 \n" | 120 | "sub r3, r3, r7 \n" |
121 | "stmia %[v1]!, {r0-r3} \n" | 121 | "stmia %[v1]!, {r0-r3} \n" |
122 | #endif | 122 | #endif |
123 | ".rept " BLOCK_REPEAT "\n" | 123 | REPEAT_BLOCK( |
124 | "ldmia %[v1], {r0-r3} \n" | 124 | "ldmia %[v1], {r0-r3} \n" |
125 | "ldmia %[f2]!, {r4-r7} \n" | 125 | "ldmia %[f2]!, {r4-r7} \n" |
126 | "mla %[res], r4, r0, %[res] \n" | 126 | "mla %[res], r4, r0, %[res] \n" |
@@ -133,7 +133,7 @@ static inline int32_t vector_sp_sub(int32_t* v1, int32_t* f2, int32_t* s2) | |||
133 | "sub r2, r2, r6 \n" | 133 | "sub r2, r2, r6 \n" |
134 | "sub r3, r3, r7 \n" | 134 | "sub r3, r3, r7 \n" |
135 | "stmia %[v1]!, {r0-r3} \n" | 135 | "stmia %[v1]!, {r0-r3} \n" |
136 | ".endr \n" | 136 | ) |
137 | #if ORDER > 32 | 137 | #if ORDER > 32 |
138 | "subs %[cnt], %[cnt], #1 \n" | 138 | "subs %[cnt], %[cnt], #1 \n" |
139 | "bne 1b \n" | 139 | "bne 1b \n" |
@@ -173,14 +173,14 @@ static inline int32_t scalarproduct(int32_t* v1, int32_t* v2) | |||
173 | "mla %[res], r6, r2, %[res] \n" | 173 | "mla %[res], r6, r2, %[res] \n" |
174 | "mla %[res], r7, r3, %[res] \n" | 174 | "mla %[res], r7, r3, %[res] \n" |
175 | #endif | 175 | #endif |
176 | ".rept " BLOCK_REPEAT "\n" | 176 | REPEAT_BLOCK( |
177 | "ldmia %[v1]!, {r0-r3} \n" | 177 | "ldmia %[v1]!, {r0-r3} \n" |
178 | "ldmia %[v2]!, {r4-r7} \n" | 178 | "ldmia %[v2]!, {r4-r7} \n" |
179 | "mla %[res], r4, r0, %[res] \n" | 179 | "mla %[res], r4, r0, %[res] \n" |
180 | "mla %[res], r5, r1, %[res] \n" | 180 | "mla %[res], r5, r1, %[res] \n" |
181 | "mla %[res], r6, r2, %[res] \n" | 181 | "mla %[res], r6, r2, %[res] \n" |
182 | "mla %[res], r7, r3, %[res] \n" | 182 | "mla %[res], r7, r3, %[res] \n" |
183 | ".endr \n" | 183 | ) |
184 | #if ORDER > 32 | 184 | #if ORDER > 32 |
185 | "subs %[cnt], %[cnt], #1 \n" | 185 | "subs %[cnt], %[cnt], #1 \n" |
186 | "bne 1b \n" | 186 | "bne 1b \n" |