diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2006-09-24 13:15:24 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2006-09-24 13:15:24 +0000 |
commit | 0e5bd54cbb26768a2059ed5aadd7b2c15974fe6f (patch) | |
tree | 9c6a0543b2e53af93ae6042947133c2b91087114 /apps/codecs | |
parent | 5a79b4e015366fa2ee7c06cf29b3237275db369a (diff) | |
download | rockbox-0e5bd54cbb26768a2059ed5aadd7b2c15974fe6f.tar.gz rockbox-0e5bd54cbb26768a2059ed5aadd7b2c15974fe6f.zip |
Add profiling support for libfaad, and enable a small optimization.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11037 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/libfaad/Makefile | 2 | ||||
-rw-r--r-- | apps/codecs/libfaad/fixed.h | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/apps/codecs/libfaad/Makefile b/apps/codecs/libfaad/Makefile index 57c871fba7..1cb6c9246b 100644 --- a/apps/codecs/libfaad/Makefile +++ b/apps/codecs/libfaad/Makefile | |||
@@ -16,7 +16,7 @@ endif | |||
16 | 16 | ||
17 | FAADOPTS = -O2 -Wno-char-subscripts | 17 | FAADOPTS = -O2 -Wno-char-subscripts |
18 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(FAADOPTS) $(TARGET) \ | 18 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(FAADOPTS) $(TARGET) \ |
19 | $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} | 19 | $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) |
20 | 20 | ||
21 | # This sets up 'SRC' based on the files mentioned in SOURCES | 21 | # This sets up 'SRC' based on the files mentioned in SOURCES |
22 | include $(TOOLSDIR)/makesrc.inc | 22 | include $(TOOLSDIR)/makesrc.inc |
diff --git a/apps/codecs/libfaad/fixed.h b/apps/codecs/libfaad/fixed.h index 9bd77173c6..7478d2ef0f 100644 --- a/apps/codecs/libfaad/fixed.h +++ b/apps/codecs/libfaad/fixed.h | |||
@@ -71,22 +71,15 @@ static INLINE real_t MUL_F(real_t A, real_t B) | |||
71 | return A; | 71 | return A; |
72 | } | 72 | } |
73 | 73 | ||
74 | #if 0 | ||
75 | /* this currently provokes an ICE in gcc 3.4.x */ | ||
76 | static INLINE real_t MUL_C(real_t A, real_t B) | 74 | static INLINE real_t MUL_C(real_t A, real_t B) |
77 | { | 75 | { |
78 | asm volatile ( | 76 | asm volatile ( |
79 | "mac.l %[A], %[B], %%acc0\n\t" | 77 | "mac.l %[A], %[B], %%acc0\n\t" |
80 | "movclr.l %%acc0, %[A]\n\t" | 78 | "movclr.l %%acc0, %[A]\n\t" |
81 | "asl.l #3, %[A]" | ||
82 | : [A] "+&d" (A) : [B] "r" (B) | 79 | : [A] "+&d" (A) : [B] "r" (B) |
83 | ); | 80 | ); |
84 | return A; | 81 | return A << 3; |
85 | } | 82 | } |
86 | #else | ||
87 | /* keep this one around until the ICE is solved */ | ||
88 | #define MUL_C(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (COEF_BITS-1))) >> COEF_BITS) | ||
89 | #endif | ||
90 | 83 | ||
91 | /* MUL_R needs too many shifts for us to just operate on the top 32 bits the | 84 | /* MUL_R needs too many shifts for us to just operate on the top 32 bits the |
92 | emac unit gives as usual, so we do a full 64 bit mul here. */ | 85 | emac unit gives as usual, so we do a full 64 bit mul here. */ |