about summary refs log tree commit diff stats
path: root/src/dynarec/dynarec_native.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-07-01 10:39:30 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-07-01 10:39:30 +0200
commit3f8303806128cb726a177060a824e598e4569948 (patch)
treebeab0fd25acddbd65ed3c55934bd2a8e2aa11c6c /src/dynarec/dynarec_native.c
parent01568f8fd30e9b0c2b56fc3262bb0fe5680fea4c (diff)
downloadbox64-3f8303806128cb726a177060a824e598e4569948.tar.gz
box64-3f8303806128cb726a177060a824e598e4569948.zip
[DYNAREC] Keep internal jmp table to the end
Diffstat (limited to 'src/dynarec/dynarec_native.c')
-rw-r--r--src/dynarec/dynarec_native.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dynarec/dynarec_native.c b/src/dynarec/dynarec_native.c
index 040ce70a..0bfa80ee 100644
--- a/src/dynarec/dynarec_native.c
+++ b/src/dynarec/dynarec_native.c
@@ -590,11 +590,9 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr, int alternate, int is32bit
             }
         }
     }
-    // no need for next and jmps anymore
+    // no need for next anymore
     helper.next_sz = helper.next_cap = 0;
     helper.next = NULL;
-    helper.jmp_sz = helper.jmp_cap = 0;
-    helper.jmps = NULL;
     // fill predecessors with the jump address
     int alloc_size = sizePredecessors(&helper);
     helper.predecessor = (int*)alloca(alloc_size*sizeof(int));
@@ -679,6 +677,9 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr, int alternate, int is32bit
         CancelBlock64(0);
         return NULL;
     }
+    // no need for jmps anymore
+    helper.jmp_sz = helper.jmp_cap = 0;
+    helper.jmps = NULL;
     // keep size of instructions for signal handling
     block->instsize = instsize;
     helper.table64 = NULL;