default to 8 MB cache size on non-{alpha,powerpc} platforms

This commit is contained in:
gbeauche 2005-03-13 23:41:42 +00:00
parent 05a7453d54
commit 4918fe8d2d
2 changed files with 11 additions and 5 deletions

View File

@ -29,6 +29,16 @@
#define STATIC_ICACHE_ALLOC 1
#endif
// Default cache size
#if defined(__alpha__)
const int JIT_CACHE_SIZE = 2 * 1024 * 1024;
#elif defined(__powerpc__)
const int JIT_CACHE_SIZE = 4 * 1024 * 1024;
#else
const int JIT_CACHE_SIZE = 8 * 1024 * 1024;
#endif
const int JIT_CACHE_SIZE_GUARD = 4096;
#if STATIC_ICACHE_ALLOC
const int G_TRANSLATION_CACHE_SIZE = 3 * 1024 * 1024; // 3 MB
static uint8 g_translation_cache[G_TRANSLATION_CACHE_SIZE];

View File

@ -27,12 +27,8 @@
class basic_jit_cache
{
// Default cache size (2 MB)
static const uint32 JIT_CACHE_SIZE = 2 * 1024 * 1024;
static const uint32 JIT_CACHE_SIZE_GUARD = 4096;
uint32 cache_size;
// Translation cache (allocated base, current pointer, end pointer)
uint32 cache_size;
uint8 *tcode_start;
uint8 *code_start;
uint8 *code_p;