about summary refs log tree commit diff stats
path: root/src/dynarec/dynarec_native_pass.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-03-24 12:03:18 +0100
committerptitSeb <sebastien.chev@gmail.com>2025-03-24 12:03:18 +0100
commitd7744ea22d511ede738bda7f2f5d7520f246aa4b (patch)
tree7b9a099f3b0b18b1ef5516bcc2a0a1e64837be19 /src/dynarec/dynarec_native_pass.c
parentd3d3fa25f5878df6ef458afd8d59162a549e9d0c (diff)
downloadbox64-d7744ea22d511ede738bda7f2f5d7520f246aa4b.tar.gz
box64-d7744ea22d511ede738bda7f2f5d7520f246aa4b.zip
[DYNAREC] Better handling of blocksize limit when generating very large dynablocks
Diffstat (limited to 'src/dynarec/dynarec_native_pass.c')
-rw-r--r--src/dynarec/dynarec_native_pass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dynarec/dynarec_native_pass.c b/src/dynarec/dynarec_native_pass.c
index 8128d1b8..ba9bf9da 100644
--- a/src/dynarec/dynarec_native_pass.c
+++ b/src/dynarec/dynarec_native_pass.c
@@ -32,7 +32,7 @@
 #endif
 #endif
 
-uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int is32bits)
+uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int is32bits, int inst_max)
 {
     int ok = 1;
     int ninst = 0;
@@ -78,7 +78,7 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int
         // This test is here to prevent things like TABLE64 to be out of range
         // native_size is not exact at this point, but it should be larger, not smaller, and not by a huge margin anyway
         // so it's good enough to avoid overflow in relative to PC data fectching
-        if((dyn->native_size >= MAXBLOCK_SIZE) || (ninst >= MAX_INSTS)) {
+        if(ninst >= inst_max) {
             need_epilog = 1;
             break;
         }