diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-07-04 19:23:18 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-07-04 19:23:18 +0000 |
commit | e7cdd6cbc6040c3c6225580ba155edfdfd35efb1 (patch) | |
tree | 53851e30bee5c1815118b141afe363cd6d63dbf3 /apps/codecs/libwma/wmafixed.h | |
parent | fe8ae10ab41af912bee3d6c5b0dd50ddc74739fa (diff) | |
download | rockbox-e7cdd6cbc6040c3c6225580ba155edfdfd35efb1.tar.gz rockbox-e7cdd6cbc6040c3c6225580ba155edfdfd35efb1.zip |
Assemblerised CMUL() for ARM, giving ~20% speedup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13787 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma/wmafixed.h')
-rw-r--r-- | apps/codecs/libwma/wmafixed.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/apps/codecs/libwma/wmafixed.h b/apps/codecs/libwma/wmafixed.h index 887973a78a..99ddec759e 100644 --- a/apps/codecs/libwma/wmafixed.h +++ b/apps/codecs/libwma/wmafixed.h | |||
@@ -61,30 +61,6 @@ long fsincos(unsigned long phase, fixed32 *cos); | |||
61 | __result; \ | 61 | __result; \ |
62 | }) | 62 | }) |
63 | 63 | ||
64 | /* | ||
65 | Special fixmul32 that does a 16.16 x 1.31 multiply that returns a 16.16 value. | ||
66 | this is needed because the fft constants are all normalized to be less then 1 | ||
67 | and can't fit into a 16 bit number without excessive rounding | ||
68 | |||
69 | |||
70 | */ | ||
71 | |||
72 | |||
73 | # define fixmul32b(x, y) \ | ||
74 | ({ int32_t __hi; \ | ||
75 | uint32_t __lo; \ | ||
76 | int32_t __result; \ | ||
77 | asm ("smull %0, %1, %3, %4\n\t" \ | ||
78 | "movs %0, %0, lsr %5\n\t" \ | ||
79 | "adc %2, %0, %1, lsl %6" \ | ||
80 | : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \ | ||
81 | : "%r" (x), "r" (y), \ | ||
82 | "M" (31), "M" (1) \ | ||
83 | : "cc"); \ | ||
84 | __result; \ | ||
85 | }) | ||
86 | |||
87 | |||
88 | #elif defined(CPU_COLDFIRE) | 64 | #elif defined(CPU_COLDFIRE) |
89 | static inline int32_t fixmul32(int32_t x, int32_t y) | 65 | static inline int32_t fixmul32(int32_t x, int32_t y) |
90 | { | 66 | { |