93 |
|
// SIGSEGV handler |
94 |
|
static sigsegv_return_t sigsegv_handler(sigsegv_address_t, sigsegv_address_t); |
95 |
|
|
96 |
+ |
// JIT Compiler enabled? |
97 |
+ |
static inline bool enable_jit_p() |
98 |
+ |
{ |
99 |
+ |
return PrefsFindBool("jit"); |
100 |
+ |
} |
101 |
+ |
|
102 |
|
|
103 |
|
/** |
104 |
|
* PowerPC emulator glue with special 'sheep' opcodes |
124 |
|
uint32 get_cr() const { return cr().get(); } |
125 |
|
void set_cr(uint32 v) { cr().set(v); } |
126 |
|
|
121 |
– |
// Execution loop |
122 |
– |
void execute(uint32 entry, bool enable_cache = false); |
123 |
– |
|
127 |
|
// Execute 68k routine |
128 |
|
void execute_68k(uint32 entry, M68kRegisters *r); |
129 |
|
|
156 |
|
lazy_allocator< sheepshaver_cpu > allocator_helper< sheepshaver_cpu, lazy_allocator >::allocator; |
157 |
|
|
158 |
|
sheepshaver_cpu::sheepshaver_cpu() |
159 |
< |
: powerpc_cpu() |
159 |
> |
: powerpc_cpu(enable_jit_p()) |
160 |
|
{ |
161 |
|
init_decoder(); |
162 |
|
} |
247 |
|
} |
248 |
|
} |
249 |
|
|
247 |
– |
// Execution loop |
248 |
– |
void sheepshaver_cpu::execute(uint32 entry, bool enable_cache) |
249 |
– |
{ |
250 |
– |
powerpc_cpu::execute(entry, enable_cache); |
251 |
– |
} |
252 |
– |
|
250 |
|
// Handle MacOS interrupt |
251 |
|
void sheepshaver_cpu::interrupt(uint32 entry) |
252 |
|
{ |
683 |
|
current_cpu->start_log(); |
684 |
|
#endif |
685 |
|
// start emulation loop and enable code translation or caching |
686 |
< |
current_cpu->execute(entry, true); |
686 |
> |
current_cpu->execute(entry); |
687 |
|
} |
688 |
|
|
689 |
|
/* |