diff options
| author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-30 12:35:12 +0000 |
|---|---|---|
| committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-30 12:35:12 +0000 |
| commit | c940811ade7d99a0e0d414df7c6509672413684a (patch) | |
| tree | 26c8f8a3e1c858164073bb2610e99866d21947cc /apps | |
| parent | 72213e6b1b45a46ada6a6935ff911c3c56d02228 (diff) | |
| download | rockbox-c940811ade7d99a0e0d414df7c6509672413684a.zip rockbox-c940811ade7d99a0e0d414df7c6509672413684a.tar.gz rockbox-c940811ade7d99a0e0d414df7c6509672413684a.tar.bz2 rockbox-c940811ade7d99a0e0d414df7c6509672413684a.tar.xz | |
Introduce CPU dependent IRAM configuration for libgme. Use ICODE_ATTR for an emu2413-function to speed up PP5022 by up to 6%.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30379 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/codecs/libgme/blargg_common.h | 15 | ||||
| -rw-r--r-- | apps/codecs/libgme/emu2413.c | 2 | ||||
| -rw-r--r-- | apps/codecs/libgme/emu2413.h | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/apps/codecs/libgme/blargg_common.h b/apps/codecs/libgme/blargg_common.h index 74125bb..65ae76a 100644 --- a/apps/codecs/libgme/blargg_common.h +++ b/apps/codecs/libgme/blargg_common.h @@ -25,6 +25,21 @@ #define FP_ONE_GAIN (1LL << 24) #define FP_ONE_VOLUME FP_ONE_GAIN +// IRAM configuration +#if (CONFIG_CPU == MCF5250) +#define EMU2413_CALC_ICODE + +#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) +#define EMU2413_CALC_ICODE ICODE_ATTR + +#elif defined(CPU_S5L870X) +#define EMU2413_CALC_ICODE + +#else +#define EMU2413_CALC_ICODE + +#endif + // BLARGG_RESTRICT: equivalent to C99's restrict, where supported #if __GNUC__ >= 3 || _MSC_VER >= 1100 #define BLARGG_RESTRICT __restrict diff --git a/apps/codecs/libgme/emu2413.c b/apps/codecs/libgme/emu2413.c index 48f32d8..44782c3 100644 --- a/apps/codecs/libgme/emu2413.c +++ b/apps/codecs/libgme/emu2413.c @@ -1423,6 +1423,8 @@ calc_slot_hat (OPLL_SLOT *slot, e_int32 pgout_cym, e_uint32 noise) }
static e_int16
+calc (OPLL * opll) EMU2413_CALC_ICODE;
+static e_int16
calc (OPLL * opll)
{
e_int32 i;
diff --git a/apps/codecs/libgme/emu2413.h b/apps/codecs/libgme/emu2413.h index 89d6e4d..6a19b10 100644 --- a/apps/codecs/libgme/emu2413.h +++ b/apps/codecs/libgme/emu2413.h @@ -137,7 +137,7 @@ EMU2413_API void OPLL_writeReg(OPLL *, e_uint32 reg, e_uint32 val); EMU2413_API e_uint32 OPLL_read(OPLL *, e_uint32 port);
/* Synthsize */
-EMU2413_API e_int16 OPLL_calc(OPLL *) ;
+EMU2413_API e_int16 OPLL_calc(OPLL *) EMU2413_CALC_ICODE;
EMU2413_API void OPLL_calc_stereo(OPLL *, e_int32 out[2]) ;
EMU2413_API e_int16 *OPLL_update_buffer(OPLL *, e_uint32 length) ;
|