about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-03-07 22:03:58 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-03-07 22:03:58 +0100
commitc79c42b62df69e454f004377bdaebffcee4e0fc2 (patch)
tree457210b44a5edbb048a7fbd29ab3366b0e35a28b /src/main.c
parent91dd7adbfa8bd1827c5bd6b21aea5e370d4f93a0 (diff)
downloadbox64-c79c42b62df69e454f004377bdaebffcee4e0fc2.tar.gz
box64-c79c42b62df69e454f004377bdaebffcee4e0fc2.zip
[DYNAREC] Added BOX64_DYNAREC_FORWARD parameter, with a default value to 128 (works well on box64, with up to 30% more speed)
Diffstat (limited to 'src/main.c')
-rwxr-xr-xsrc/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 8119af20..8f956361 100755
--- a/src/main.c
+++ b/src/main.c
@@ -51,6 +51,7 @@ int box64_dynarec = 1;
 int box64_dynarec_dump = 0;
 int box64_dynarec_forced = 0;
 int box64_dynarec_bigblock = 1;
+int box64_dynarec_forward = 128;
 int box64_dynarec_strongmem = 0;
 int box64_dynarec_x87double = 0;
 int box64_dynarec_fastnan = 1;
@@ -479,6 +480,18 @@ void LoadLogEnv()
             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_FORWARD");
+    if(p) {
+        int val = -1;
+        if(sscanf(p, "%d", &val)==1) {
+            if(val>=0)
+                box64_dynarec_forward = val;
+        }
+        if(box64_dynarec_forward)
+            printf_log(LOG_INFO, "Dynarec will continue block for %d bytes on forward jump\n", box64_dynarec_forward);
+        else
+            printf_log(LOG_INFO, "Dynarec will not continue block on forward jump\n");
+    }
     p = getenv("BOX64_DYNAREC_STRONGMEM");
     if(p) {
         if(strlen(p)==1) {