mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-08-11 00:25:03 +00:00
Gather stats about compile time. Define KPX_MAX_CPUS to 1 for allowing
allocation of translation cache into .data section on PowerPC.
This commit is contained in:
@@ -81,6 +81,8 @@
|
|||||||
#define PPC_CHECK_INTERRUPTS (ASYNC_IRQ ? 0 : 1)
|
#define PPC_CHECK_INTERRUPTS (ASYNC_IRQ ? 0 : 1)
|
||||||
#define PPC_DECODE_CACHE 1
|
#define PPC_DECODE_CACHE 1
|
||||||
#define PPC_FLIGHT_RECORDER 1
|
#define PPC_FLIGHT_RECORDER 1
|
||||||
|
#define PPC_PROFILE_COMPILE_TIME 1
|
||||||
|
#define KPX_MAX_CPUS 1
|
||||||
#else
|
#else
|
||||||
// Mac ROM is write protected
|
// Mac ROM is write protected
|
||||||
#define ROM_IS_WRITE_PROTECTED 1
|
#define ROM_IS_WRITE_PROTECTED 1
|
||||||
|
@@ -25,13 +25,11 @@
|
|||||||
#define DEBUG 0
|
#define DEBUG 0
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
// FIXME: Define this only for SheepShaver. Kheperix will need
|
#if KPX_MAX_CPUS == 1 && HAVE_STATIC_DATA_EXEC
|
||||||
// something like KPX_MAX_CPUS == 1.
|
#define STATIC_ICACHE_ALLOC 1
|
||||||
#ifndef SHEEPSHAVER
|
|
||||||
#undef HAVE_STATIC_DATA_EXEC
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_STATIC_DATA_EXEC
|
#if STATIC_ICACHE_ALLOC
|
||||||
static uint8 g_translation_cache[basic_jit_cache::JIT_CACHE_SIZE];
|
static uint8 g_translation_cache[basic_jit_cache::JIT_CACHE_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -54,7 +52,7 @@ basic_jit_cache::init_translation_cache(uint32 size)
|
|||||||
uint32 effective_cache_size = (size - JIT_CACHE_SIZE_GUARD) & -roundup;
|
uint32 effective_cache_size = (size - JIT_CACHE_SIZE_GUARD) & -roundup;
|
||||||
cache_size = size & -roundup;
|
cache_size = size & -roundup;
|
||||||
|
|
||||||
#if HAVE_STATIC_DATA_EXEC
|
#if STATIC_ICACHE_ALLOC
|
||||||
if (cache_size <= JIT_CACHE_SIZE) {
|
if (cache_size <= JIT_CACHE_SIZE) {
|
||||||
tcode_start = g_translation_cache;
|
tcode_start = g_translation_cache;
|
||||||
goto done;
|
goto done;
|
||||||
@@ -85,7 +83,7 @@ void
|
|||||||
basic_jit_cache::kill_translation_cache()
|
basic_jit_cache::kill_translation_cache()
|
||||||
{
|
{
|
||||||
if (tcode_start) {
|
if (tcode_start) {
|
||||||
#if HAVE_STATIC_DATA_EXEC
|
#if STATIC_ICACHE_ALLOC
|
||||||
if (cache_size > JIT_CACHE_SIZE)
|
if (cache_size > JIT_CACHE_SIZE)
|
||||||
#endif
|
#endif
|
||||||
vm_release(tcode_start, cache_size);
|
vm_release(tcode_start, cache_size);
|
||||||
|
Reference in New Issue
Block a user