summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2007-07-04 17:51:52 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2007-07-04 17:51:52 +0000
commitfe8ae10ab41af912bee3d6c5b0dd50ddc74739fa (patch)
treefb2cc1009699de10c8ce515902a702964551737e
parent51b3bbbf1c8f9eeac997035bc333db05bd342a33 (diff)
Attempt #2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13786 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libwma/SOURCES2
-rw-r--r--apps/codecs/libwma/wmafixed.c25
-rw-r--r--apps/codecs/libwma/wmafixed.h23
3 files changed, 25 insertions, 25 deletions
diff --git a/apps/codecs/libwma/SOURCES b/apps/codecs/libwma/SOURCES
index 190e3a7ba3..65166464fd 100644
--- a/apps/codecs/libwma/SOURCES
+++ b/apps/codecs/libwma/SOURCES
@@ -1,3 +1,3 @@
wmadeci.c
common.c
-wmafixed.c \ No newline at end of file
+wmafixed.c
diff --git a/apps/codecs/libwma/wmafixed.c b/apps/codecs/libwma/wmafixed.c
index 45a827af15..7c38009754 100644
--- a/apps/codecs/libwma/wmafixed.c
+++ b/apps/codecs/libwma/wmafixed.c
@@ -53,30 +53,8 @@ fixed64 Fixed32To64(fixed32 x)
/*Sign-15.16 format */
#ifdef CPU_ARM
/* these are defines in wmafixed.h*/
-
-
#elif defined(CPU_COLDFIRE)
-inline int32_t fixmul32(int32_t x, int32_t y)
-{
-#if PRECISION != 16
-#warning Coldfire fixmul32() only works for PRECISION == 16
-#endif
- int32_t t1;
- asm (
- "mac.l %[x], %[y], %%acc0 \n" /* multiply */
- "mulu.l %[y], %[x] \n" /* get lower half, avoid emac stall */
- "movclr.l %%acc0, %[t1] \n" /* get higher half */
- "lsr.l #1, %[t1] \n"
- "move.w %[t1], %[x] \n"
- "swap %[x] \n"
- : /* outputs */
- [t1]"=&d"(t1),
- [x] "+d" (x)
- : /* inputs */
- [y] "d" (y)
- );
- return x;
-}
+
#else
fixed32 fixmul32(fixed32 x, fixed32 y)
@@ -91,7 +69,6 @@ fixed32 fixmul32(fixed32 x, fixed32 y)
}
-
/*
Special fixmul32 that does a 16.16 x 1.31 multiply that returns a 16.16 value.
this is needed because the fft constants are all normalized to be less then 1
diff --git a/apps/codecs/libwma/wmafixed.h b/apps/codecs/libwma/wmafixed.h
index 878601d799..887973a78a 100644
--- a/apps/codecs/libwma/wmafixed.h
+++ b/apps/codecs/libwma/wmafixed.h
@@ -85,7 +85,30 @@ long fsincos(unsigned long phase, fixed32 *cos);
})
+#elif defined(CPU_COLDFIRE)
+static inline int32_t fixmul32(int32_t x, int32_t y)
+{
+#if PRECISION != 16
+#warning Coldfire fixmul32() only works for PRECISION == 16
+#endif
+ int32_t t1;
+ asm (
+ "mac.l %[x], %[y], %%acc0 \n" /* multiply */
+ "mulu.l %[y], %[x] \n" /* get lower half, avoid emac stall */
+ "movclr.l %%acc0, %[t1] \n" /* get higher half */
+ "lsr.l #1, %[t1] \n"
+ "move.w %[t1], %[x] \n"
+ "swap %[x] \n"
+ : /* outputs */
+ [t1]"=&d"(t1),
+ [x] "+d" (x)
+ : /* inputs */
+ [y] "d" (y)
+ );
+ return x;
+}
#else
+
fixed32 fixmul32(fixed32 x, fixed32 y);
fixed32 fixmul32b(fixed32 x, fixed32 y);
#endif