From 2f1024f16763165db359e7c30ad7034a4434d752 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sun, 27 Feb 2022 19:06:21 +0800 Subject: [DYNAREC] More multi-arch work --- src/custommem.c | 7 +++---- src/dynarec/dynarec.c | 27 +++++++++++++++------------ 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/custommem.c b/src/custommem.c index c92b7b03..236456a0 100644 --- a/src/custommem.c +++ b/src/custommem.c @@ -644,6 +644,9 @@ void cleanDBFromAddressRange(uintptr_t addr, size_t size, int destroy) #ifdef ARM64 void arm64_next(void); #define native_next arm64_next +#elif defined(LA464) +void la464_next(void); +#define native_next la464_next #else #error Unsupported architecture #endif @@ -1162,7 +1165,6 @@ void init_custommem_helper(box64context_t* ctx) memprot[i] = memprot_default; init_mutexes(); #ifdef DYNAREC -#ifdef ARM64 if(box64_dynarec) for(int i=0; i<(1<done) { // not finished yet... leave linker - //tableupdate(arm_linker, addr, table); - return arm64_epilog; + return native_epilog; } if(!(jblock=block->block)) { // null block, but done: go to epilog, no linker here - return arm64_epilog; + return native_epilog; } //dynablock_t *father = block->father?block->father:block; return jblock; @@ -131,9 +138,7 @@ void DynaCall(x64emu_t* emu, uintptr_t addr) dynarec_log(LOG_DEBUG, "%04d|Calling DynaRec Block @%p (%p) of %d x64 instructions (father=%p) emu=%p\n", GetTID(), (void*)R_RIP, block->block, block->isize ,block->father, emu); CHECK_FLAGS(emu); // block is here, let's run it! - #ifdef ARM64 - arm64_prolog(emu, block->block); - #endif + native_prolog(emu, block->block); block = NULL; } if(emu->fork) { @@ -212,9 +217,7 @@ int DynaRun(x64emu_t* emu) } else { dynarec_log(LOG_DEBUG, "%04d|Running DynaRec Block @%p (%p) of %d x64 insts (father=%p) emu=%p\n", GetTID(), (void*)R_RIP, block->block, block->isize, block->father, emu); // block is here, let's run it! - #ifdef ARM64 - arm64_prolog(emu, block->block); - #endif + native_prolog(emu, block->block); block = NULL; } if(emu->fork) { -- cgit 1.4.1