about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-11-18 14:18:00 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-11-18 14:18:00 +0100
commit4f0e98ade5d37b8647cb5d39b6e5a3aded55fa2f (patch)
tree8f0fe7ffefe4a4396a9556b1d37035da4e229ffb /src/main.c
parent39dbfd9fd8c1cadf1a909029236dec973b190a3c (diff)
downloadbox64-4f0e98ade5d37b8647cb5d39b6e5a3aded55fa2f.tar.gz
box64-4f0e98ade5d37b8647cb5d39b6e5a3aded55fa2f.zip
[DYNAREC] Added an option to simulate Strong Memory Model, and auto activate it when libmonobdgcw-2.0.so is detected (should help #110 and #158 at least)
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 034b6d6d..c5719f4e 100755
--- a/src/main.c
+++ b/src/main.c
@@ -43,6 +43,7 @@ int box64_dynarec = 1;
 int box64_dynarec_dump = 0;
 int box64_dynarec_forced = 0;
 int box64_dynarec_bigblock = 1;
+int box64_dynarec_strongmem = 0;
 uintptr_t box64_nodynarec_start = 0;
 uintptr_t box64_nodynarec_end = 0;
 #ifdef ARM64
@@ -272,6 +273,15 @@ void LoadLogEnv()
         if(!box64_dynarec_bigblock)
         printf_log(LOG_INFO, "Dynarec will not try to make big block\n");
     }
+    p = getenv("BOX64_DYNAREC_STRONGMEM");
+    if(p) {
+        if(strlen(p)==1) {
+            if(p[0]>='0' && p[0]<='1')
+                box64_dynarec_strongmem = p[0]-'0';
+        }
+        if(box64_dynarec_strongmem)
+        printf_log(LOG_INFO, "Dynarec will try to emulate a strong memory model\n");
+    }
     p = getenv("BOX64_NODYNAREC");
     if(p) {
         if (strchr(p,'-')) {