about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-11-29 18:48:59 +0100
committerptitSeb <sebastien.chev@gmail.com>2022-11-29 18:48:59 +0100
commitc08268d0ae1977ebaaf8ecde7216461525b08238 (patch)
tree43b9edebd7594b120880bf765453fe51d8104d33 /src/main.c
parent0e4d031054b7980edc806ae131ea8ce565632dbb (diff)
downloadbox64-c08268d0ae1977ebaaf8ecde7216461525b08238.tar.gz
box64-c08268d0ae1977ebaaf8ecde7216461525b08238.zip
[DYNAREC] Added BOX64_DYNAREC_CALLRET option, in rcfile too (faster handling of CALL/RET opcode, not compatible with JIT/Dynarec)
Diffstat (limited to 'src/main.c')
-rwxr-xr-xsrc/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 6cc2e6d4..da01c4e5 100755
--- a/src/main.c
+++ b/src/main.c
@@ -51,6 +51,7 @@ int box64_dynarec_strongmem = 0;
 int box64_dynarec_x87double = 0;
 int box64_dynarec_fastnan = 1;
 int box64_dynarec_safeflags = 1;
+int box64_dynarec_callret = 0;
 uintptr_t box64_nodynarec_start = 0;
 uintptr_t box64_nodynarec_end = 0;
 #ifdef ARM64
@@ -480,6 +481,15 @@ void LoadLogEnv()
         else
             printf_log(LOG_INFO, "Dynarec will play %s safe with x64 flags\n", (box64_dynarec_safeflags==1)?"moderatly":"it");
     }
+    p = getenv("BOX64_DYNAREC_CALLRET");
+    if(p) {
+        if(strlen(p)==1) {
+            if(p[0]>='0' && p[0]<='1')
+                box64_dynarec_callret = p[0]-'0';
+        }
+        if(!box64_dynarec_callret)
+            printf_log(LOG_INFO, "Dynarec will optimize CALL/RET\n");
+    }
     p = getenv("BOX64_NODYNAREC");
     if(p) {
         if (strchr(p,'-')) {