about summary refs log tree commit diff stats
path: root/src/core.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2024-11-15 00:41:12 +0800
committerGitHub <noreply@github.com>2024-11-14 17:41:12 +0100
commit47dbbe030c2126159a31c00b6560cec7cd090a6c (patch)
treefd41b8d5bdfeda858a998bba8cced47a8b81b603 /src/core.c
parentd05e719ce3caa5fd6e7de656f4d28a91bb718dca (diff)
downloadbox64-47dbbe030c2126159a31c00b6560cec7cd090a6c.tar.gz
box64-47dbbe030c2126159a31c00b6560cec7cd090a6c.zip
[DYNAREC] Added a experimental BOX64_DYNAREC_WEAKBARRIER option (#2033)
* [DYNAREC] Added a experimental BOX64_DYNAREC_WEAKBARRIER option

* Added it to the RCFILE
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 93bdd763..07579917 100644
--- a/src/core.c
+++ b/src/core.c
@@ -79,6 +79,7 @@ int box64_dynarec_forced = 0;
 int box64_dynarec_bigblock = 1;
 int box64_dynarec_forward = 128;
 int box64_dynarec_strongmem = 0;
+int box64_dynarec_weakbarrier = 0;
 int box64_dynarec_x87double = 0;
 int box64_dynarec_div0 = 0;
 int box64_dynarec_fastnan = 1;
@@ -785,6 +786,15 @@ void LoadLogEnv()
         if(box64_dynarec_strongmem)
             printf_log(LOG_INFO, "Dynarec will try to emulate a strong memory model%s\n", (box64_dynarec_strongmem==1)?" with limited performance loss":((box64_dynarec_strongmem>1)?" with more performance loss":""));
     }
+    p = getenv("BOX64_DYNAREC_WEAKBARRIER");
+    if (p) {
+        if (strlen(p) == 1) {
+            if (p[0] >= '0' && p[0] <= '1')
+                box64_dynarec_weakbarrier = p[0] - '0';
+        }
+        if (box64_dynarec_weakbarrier)
+            printf_log(LOG_INFO, "Dynarec will try to use weaker memory barriers to reduce the performance loss introduce by strong memory emulation\n");
+    }
     p = getenv("BOX64_DYNAREC_X87DOUBLE");
     if(p) {
         if(strlen(p)==1) {