mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-10-06 21:56:22 +00:00
Make FlushCodeRange aware of the JIT compiler's flush_icache()
This commit is contained in:
parent
0b001e81a5
commit
6f3a214a15
@ -80,6 +80,10 @@ using std::string;
|
|||||||
#include "vm_alloc.h"
|
#include "vm_alloc.h"
|
||||||
#include "sigsegv.h"
|
#include "sigsegv.h"
|
||||||
|
|
||||||
|
#if USE_JIT
|
||||||
|
extern void (*flush_icache)(int); // from compemu_support.cpp
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MON
|
#ifdef ENABLE_MON
|
||||||
# include "mon.h"
|
# include "mon.h"
|
||||||
#endif
|
#endif
|
||||||
@ -205,7 +209,7 @@ char *strdup(const char *s)
|
|||||||
|
|
||||||
static void sigsegv_dump_state(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction)
|
static void sigsegv_dump_state(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "do_handle_screen_fault: unhandled address %p", fault_address);
|
fprintf(stderr, "Caught SIGSEGV at address %p", fault_address);
|
||||||
if (fault_instruction != SIGSEGV_INVALID_PC)
|
if (fault_instruction != SIGSEGV_INVALID_PC)
|
||||||
fprintf(stderr, " [IP=%p]", fault_instruction);
|
fprintf(stderr, " [IP=%p]", fault_instruction);
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
@ -213,6 +217,10 @@ static void sigsegv_dump_state(sigsegv_address_t fault_address, sigsegv_address_
|
|||||||
uaecptr nextpc;
|
uaecptr nextpc;
|
||||||
extern void m68k_dumpstate(uaecptr *nextpc);
|
extern void m68k_dumpstate(uaecptr *nextpc);
|
||||||
m68k_dumpstate(&nextpc);
|
m68k_dumpstate(&nextpc);
|
||||||
|
#endif
|
||||||
|
#if USE_JIT && JIT_DEBUG
|
||||||
|
extern void compiler_dumpstate(void);
|
||||||
|
compiler_dumpstate();
|
||||||
#endif
|
#endif
|
||||||
VideoQuitFullScreen();
|
VideoQuitFullScreen();
|
||||||
#ifdef ENABLE_MON
|
#ifdef ENABLE_MON
|
||||||
@ -726,6 +734,10 @@ void QuitEmulator(void)
|
|||||||
|
|
||||||
void FlushCodeCache(void *start, uint32 size)
|
void FlushCodeCache(void *start, uint32 size)
|
||||||
{
|
{
|
||||||
|
#if USE_JIT
|
||||||
|
if (UseJIT)
|
||||||
|
flush_icache(-1);
|
||||||
|
#endif
|
||||||
#if !EMULATED_68K && defined(__NetBSD__)
|
#if !EMULATED_68K && defined(__NetBSD__)
|
||||||
m68k_sync_icache(start, size);
|
m68k_sync_icache(start, size);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user