From 067dcbc0f75533761b430d58724df2489a678f5c Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 25 Oct 2022 18:34:38 +0200 Subject: [DYNAREC] Added BIGBLOCK=3 level --- src/dynarec/dynarec_native_pass.c | 5 ++++- src/main.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/dynarec/dynarec_native_pass.c b/src/dynarec/dynarec_native_pass.c index b095889a..86743179 100755 --- a/src/dynarec/dynarec_native_pass.c +++ b/src/dynarec/dynarec_native_pass.c @@ -18,6 +18,7 @@ #include "dynablock.h" #include "dynarec_native.h" #include "custommem.h" +#include "elfloader.h" #include "dynarec_arch.h" #include "dynarec_helper.h" @@ -43,6 +44,7 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr) fpu_reset(dyn); int reset_n = -1; dyn->last_ip = (dyn->insts && dyn->insts[0].pred_sz)?0:ip; // RIP is always set at start of block unless there is a predecessor! + int stopblock = 2+(FindElfAddress(my_context, addr)?0:1); // if block is in elf_memory, it can be extended with bligblocks==2, else it needs 3 // ok, go now INIT; while(ok) { @@ -217,7 +219,8 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr) if(ok<0) {ok = 0; need_epilog=1;} ++ninst; #if STEP == 0 - if(ok && ((!isJumpTableDefault64((void*)addr) && (box64_dynarec_bigblock<2)) || (addr>=box64_nodynarec_start && addr=box64_nodynarec_start && addrsize)) #endif diff --git a/src/main.c b/src/main.c index b522f635..542cdea1 100755 --- a/src/main.c +++ b/src/main.c @@ -421,13 +421,13 @@ void LoadLogEnv() p = getenv("BOX64_DYNAREC_BIGBLOCK"); if(p) { if(strlen(p)==1) { - if(p[0]>='0' && p[0]<='2') + if(p[0]>='0' && p[0]<='3') box64_dynarec_bigblock = p[0]-'0'; } if(!box64_dynarec_bigblock) printf_log(LOG_INFO, "Dynarec will not try to make big block\n"); else if (box64_dynarec_bigblock>1) - printf_log(LOG_INFO, "Dynarec will try to make bigger blocks\n"); + printf_log(LOG_INFO, "Dynarec will try to make bigger blocks%s\n", (box64_dynarec_bigblock>2)?" even on non-elf memory":""); } p = getenv("BOX64_DYNAREC_STRONGMEM"); -- cgit 1.4.1