From 8b3d4404d77bcc806631e17038f046d409cb6b69 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 8 Apr 2025 14:22:07 +0200 Subject: [DYNAREC] Do not mark a dynablock as always_test for loop on itself that are not alive --- src/dynarec/dynarec_native.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/dynarec/dynarec_native.c b/src/dynarec/dynarec_native.c index 4e0e9bdc..58aa4493 100644 --- a/src/dynarec/dynarec_native.c +++ b/src/dynarec/dynarec_native.c @@ -654,8 +654,6 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr, int alternate, int is32bit uintptr_t j = helper.insts[i].x64.jmp; helper.insts[i].x64.jmp_insts = -1; if(j=end || j==helper.insts[i].x64.addr) { - if(j==helper.insts[i].x64.addr) // if there is a loop on some opcode, make the block "always to tested" - helper.always_test = 1; helper.insts[i].x64.need_after |= X_PEND; } else { // find jump address instruction @@ -700,9 +698,6 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr, int alternate, int is32bit } } } - // no need for next anymore - helper.next_sz = helper.next_cap = 0; - helper.next = NULL; // fill predecessors with the jump address int alloc_size = sizePredecessors(&helper); helper.predecessor = (int*)alloca(alloc_size*sizeof(int)); @@ -738,7 +733,16 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr, int alternate, int is32bit } updateYmm0s(&helper, 0, 0); UPDATE_SPECIFICS(&helper); - + // check for still valid close loop + for(int ii=0; ii