summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Hooper <dave@beermex.com>2009-08-29 12:20:04 +0000
committerDave Hooper <dave@beermex.com>2009-08-29 12:20:04 +0000
commit260ed991392a387ff9ae5bbd8dba7afd10c1faef (patch)
treec0468e65d15081ec183921915ff10afc68aeb8bd
parente9dcb0f1457f83b33bd9778e9df4caff44ead6c1 (diff)
downloadrockbox-260ed991392a387ff9ae5bbd8dba7afd10c1faef.tar.gz
rockbox-260ed991392a387ff9ae5bbd8dba7afd10c1faef.tar.bz2
rockbox-260ed991392a387ff9ae5bbd8dba7afd10c1faef.zip
Removed remaining MB usage
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22527 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/lib/asm_mcf5249.h2
-rw-r--r--apps/codecs/lib/codeclib_misc.h7
-rw-r--r--apps/codecs/lib/mdct2.c13
3 files changed, 0 insertions, 22 deletions
diff --git a/apps/codecs/lib/asm_mcf5249.h b/apps/codecs/lib/asm_mcf5249.h
index 88b7961431..8378accb2a 100644
--- a/apps/codecs/lib/asm_mcf5249.h
+++ b/apps/codecs/lib/asm_mcf5249.h
@@ -27,8 +27,6 @@
#ifndef _V_WIDE_MATH
#define _V_WIDE_MATH
-#define MB()
-
static inline int32_t MULT32(int32_t x, int32_t y) {
asm volatile ("mac.l %[x], %[y], %%acc0;" /* multiply & shift */
diff --git a/apps/codecs/lib/codeclib_misc.h b/apps/codecs/lib/codeclib_misc.h
index f522d33544..54bebb744f 100644
--- a/apps/codecs/lib/codeclib_misc.h
+++ b/apps/codecs/lib/codeclib_misc.h
@@ -105,13 +105,6 @@ static inline int32_t MULT31_SHIFT15(int32_t x, int32_t y) {
#endif
/*
- * This should be used as a memory barrier, forcing all cached values in
- * registers to wr writen back to memory. Might or might not be beneficial
- * depending on the architecture and compiler.
- */
-#define MB()
-
-/*
* The XPROD functions are meant to optimize the cross products found all
* over the place in mdct.c by forcing memory operation ordering to avoid
* unnecessary register reloads as soon as memory is being written to.
diff --git a/apps/codecs/lib/mdct2.c b/apps/codecs/lib/mdct2.c
index 6d9168804c..3accc51e57 100644
--- a/apps/codecs/lib/mdct2.c
+++ b/apps/codecs/lib/mdct2.c
@@ -74,7 +74,6 @@ static inline void mdct_butterfly_8(int32_t *x){
x[5] = r6 - r2;
x[6] = r4 + r0;
x[7] = r6 + r2;
- MB();
}
/* 16 point butterfly (in place, 4 register) */
@@ -86,23 +85,19 @@ static inline void mdct_butterfly_16(int32_t *x){
r1 = x[ 1] - x[ 9]; x[ 9] += x[ 1];
x[ 0] = MULT31((r0 + r1) , cPI2_8);
x[ 1] = MULT31((r1 - r0) , cPI2_8);
- MB();
r0 = x[10] - x[ 2]; x[10] += x[ 2];
r1 = x[ 3] - x[11]; x[11] += x[ 3];
x[ 2] = r1; x[ 3] = r0;
- MB();
r0 = x[12] - x[ 4]; x[12] += x[ 4];
r1 = x[13] - x[ 5]; x[13] += x[ 5];
x[ 4] = MULT31((r0 - r1) , cPI2_8);
x[ 5] = MULT31((r0 + r1) , cPI2_8);
- MB();
r0 = x[14] - x[ 6]; x[14] += x[ 6];
r1 = x[15] - x[ 7]; x[15] += x[ 7];
x[ 6] = r0; x[ 7] = r1;
- MB();
mdct_butterfly_8(x);
mdct_butterfly_8(x+8);
@@ -116,44 +111,36 @@ static inline void mdct_butterfly_32(int32_t *x){
r0 = x[30] - x[14]; x[30] += x[14];
r1 = x[31] - x[15]; x[31] += x[15];
x[14] = r0; x[15] = r1;
- MB();
r0 = x[28] - x[12]; x[28] += x[12];
r1 = x[29] - x[13]; x[29] += x[13];
XNPROD31( r0, r1, cPI1_8, cPI3_8, &x[12], &x[13] );
- MB();
r0 = x[26] - x[10]; x[26] += x[10];
r1 = x[27] - x[11]; x[27] += x[11];
x[10] = MULT31((r0 - r1) , cPI2_8);
x[11] = MULT31((r0 + r1) , cPI2_8);
- MB();
r0 = x[24] - x[ 8]; x[24] += x[ 8];
r1 = x[25] - x[ 9]; x[25] += x[ 9];
XNPROD31( r0, r1, cPI3_8, cPI1_8, &x[ 8], &x[ 9] );
- MB();
r0 = x[22] - x[ 6]; x[22] += x[ 6];
r1 = x[ 7] - x[23]; x[23] += x[ 7];
x[ 6] = r1; x[ 7] = r0;
- MB();
r0 = x[ 4] - x[20]; x[20] += x[ 4];
r1 = x[ 5] - x[21]; x[21] += x[ 5];
XPROD31 ( r0, r1, cPI3_8, cPI1_8, &x[ 4], &x[ 5] );
- MB();
r0 = x[ 2] - x[18]; x[18] += x[ 2];
r1 = x[ 3] - x[19]; x[19] += x[ 3];
x[ 2] = MULT31((r1 + r0) , cPI2_8);
x[ 3] = MULT31((r1 - r0) , cPI2_8);
- MB();
r0 = x[ 0] - x[16]; x[16] += x[ 0];
r1 = x[ 1] - x[17]; x[17] += x[ 1];
XPROD31 ( r0, r1, cPI1_8, cPI3_8, &x[ 0], &x[ 1] );
- MB();
mdct_butterfly_16(x);
mdct_butterfly_16(x+16);