about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-10-22 16:13:55 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-10-22 16:13:55 +0200
commitbf6e74ad8eb26d30de5654b7ab021a18061346b1 (patch)
treed77dc9cedeb3bb606eefee9eb4e5fcadb93296e2 /src/main.c
parentc2253dafc09b9651a263e19f5f656564f18df633 (diff)
downloadbox64-bf6e74ad8eb26d30de5654b7ab021a18061346b1.tar.gz
box64-bf6e74ad8eb26d30de5654b7ab021a18061346b1.zip
[DYNAREC] Added BOX64_DYNAREC_SAFEFLAGS
Diffstat (limited to 'src/main.c')
-rwxr-xr-xsrc/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 6db4830f..9e1bb0bd 100755
--- a/src/main.c
+++ b/src/main.c
@@ -49,6 +49,7 @@ int box64_dynarec_bigblock = 1;
 int box64_dynarec_strongmem = 0;
 int box64_dynarec_x87double = 0;
 int box64_dynarec_fastnan = 1;
+int box64_dynarec_safeflags = 1;
 uintptr_t box64_nodynarec_start = 0;
 uintptr_t box64_nodynarec_end = 0;
 #ifdef ARM64
@@ -456,6 +457,17 @@ void LoadLogEnv()
         if(!box64_dynarec_fastnan)
             printf_log(LOG_INFO, "Dynarec will try to normalize generated NAN\n");
     }
+    p = getenv("BOX64_DYNAREC_SAFEFLAGS");
+    if(p) {
+        if(strlen(p)==1) {
+            if(p[0]>='0' && p[0]<='2')
+                box64_dynarec_safeflags = p[0]-'0';
+        }
+        if(!box64_dynarec_safeflags)
+            printf_log(LOG_INFO, "Dynarec will not play it safe with x64 flags\n");
+        else
+            printf_log(LOG_INFO, "Dynarec will play %s safe with x64 flags\n", (box64_dynarec_safeflags==1)?"moderatly":"it");
+    }
     p = getenv("BOX64_NODYNAREC");
     if(p) {
         if (strchr(p,'-')) {