mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-20 00:31:28 +00:00
handle ROM areas and put associated blocks into dormant state
This commit is contained in:
parent
ceb9b4a428
commit
f034ae704f
@ -25,6 +25,7 @@
|
||||
|
||||
#ifdef SHEEPSHAVER
|
||||
#include "xlowmem.h"
|
||||
#include "cpu_emulation.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@ -37,6 +38,19 @@
|
||||
#include "mon_disass.h"
|
||||
#endif
|
||||
|
||||
// Define to enable const branches optimization
|
||||
#define FOLLOW_CONST_JUMPS 1
|
||||
|
||||
// FIXME: define ROM areas
|
||||
static inline bool is_read_only_memory(uintptr addr)
|
||||
{
|
||||
#ifdef SHEEPSHAVER
|
||||
if ((addr - ROM_BASE) < ROM_AREA_SIZE)
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Basic block disassemblers
|
||||
@ -91,8 +105,6 @@ static void disasm_translation(uint32 src_addr, uint32 src_len,
|
||||
* DynGen dynamic code translation
|
||||
**/
|
||||
|
||||
#define FOLLOW_CONST_JUMPS 1
|
||||
|
||||
#if PPC_ENABLE_JIT
|
||||
powerpc_cpu::block_info *
|
||||
powerpc_cpu::compile_block(uint32 entry_point)
|
||||
@ -1015,7 +1027,10 @@ powerpc_cpu::compile_block(uint32 entry_point)
|
||||
if (disasm)
|
||||
disasm_translation(entry_point, dpc - entry_point + 4, bi->entry_point, bi->size);
|
||||
block_cache.add_to_cl_list(bi);
|
||||
block_cache.add_to_active_list(bi);
|
||||
if (is_read_only_memory(bi->pc))
|
||||
block_cache.add_to_dormant_list(bi);
|
||||
else
|
||||
block_cache.add_to_active_list(bi);
|
||||
#if PPC_PROFILE_COMPILE_TIME
|
||||
compile_time += (clock() - start_time);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user