diff options
| author | Dave Chapman <dave@dchapman.com> | 2005-02-19 22:11:29 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2005-02-19 22:11:29 +0000 |
| commit | e9edc8f82df2c182c2453720a79ad37c55e6ef4b (patch) | |
| tree | 4f3eea003ae0124feb2afb51d3a32bce56108f6f /apps/codecs/libFLAC/include/private | |
| parent | a3ed6e9c7a90cd5dcffed397c894e480672d667c (diff) | |
| download | rockbox-e9edc8f82df2c182c2453720a79ad37c55e6ef4b.zip rockbox-e9edc8f82df2c182c2453720a79ad37c55e6ef4b.tar.gz rockbox-e9edc8f82df2c182c2453720a79ad37c55e6ef4b.tar.bz2 rockbox-e9edc8f82df2c182c2453720a79ad37c55e6ef4b.tar.xz | |
Thom Johansen's first EMAC optimisation for the Coldfire - about a 3%-4% speedup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6024 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libFLAC/include/private')
| -rw-r--r-- | apps/codecs/libFLAC/include/private/coldfire.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/apps/codecs/libFLAC/include/private/coldfire.h b/apps/codecs/libFLAC/include/private/coldfire.h new file mode 100644 index 0000000..22f1711 --- /dev/null +++ b/apps/codecs/libFLAC/include/private/coldfire.h @@ -0,0 +1,46 @@ +#ifndef SIMULATOR +#ifndef _FLAC_COLDFIRE_H +#define _FLAC_COLDFIRE_H + +#include <FLAC/ordinals.h> + +#define MACL(x, y, acc) \ + asm volatile ("mac.l %0, %1, %%" #acc \ + : : "ad" ((x)), "ad" ((y))); + +#define MACL_SHIFT(x, y, shift, acc) \ + asm volatile ("mac.l %0, %1, #" #shift ", %%" #acc \ + : : "ad" ((x)), "ad" ((y))); + +#define MSACL(x, y, acc) \ + asm volatile ("msac.l %0, %1, %%" #acc \ + : : "ad" ((x)), "ad" ((y))); + +#define MSACL_SHIFT(x, y, shift, acc) \ + asm volatile ("msac.l %0, %1, #" #shift ", %%" #acc \ + : : "ad" ((x)), "ad" ((y))); + +#define SET_MACSR(x) \ + asm volatile ("mov.l %0, %%macsr" : : "adi" ((x))); + +#define TRANSFER_ACC(acca, accb) \ + asm volatile ("mov.l %" #acca ", %" #accb); + +#define SET_ACC(x, acc) \ + asm volatile ("mov.l %0, %%" #acc : : "adi" ((x))); + +#define GET_ACC(x, acc) \ + asm volatile ("mov.l %%" #acc ", %0\n\t" : "=ad" ((x))); + +#define GET_ACC_CLR(x, acc) \ + asm volatile ("movclr.l %%" #acc ", %0\n\t" : "=ad" ((x))); + +#define EMAC_SATURATE 0x00000080 +#define EMAC_FRACTIONAL 0x00000020 +#define EMAC_ROUND 0x00000010 + + +void FLAC__lpc_restore_signal_order8_mac(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]); + +#endif +#endif |