about summary refs log tree commit diff stats
path: root/src/core.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-04-29 10:57:19 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-04-29 10:57:19 +0200
commit71c5447b8ad534f2507c0405a348d902e9374517 (patch)
treea6f9bc80d6206d488b01ac0871cc18a1aa99efb6 /src/core.c
parenta9a338ff428c0a30ffbc0cb0a26a96ed7e4aa9a0 (diff)
downloadbox64-71c5447b8ad534f2507c0405a348d902e9374517.tar.gz
box64-71c5447b8ad534f2507c0405a348d902e9374517.zip
Added a way to hide SSE 4.2, as it might slow down things using the string opcodes. Also, looks like some java program have issue with current implementation of pcmp[ei]str[im] somehow, so diabling automaticaly when detecting libjvm.so (for SlayTheSpire in particular)
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 25fa9f14..6b96d37d 100644
--- a/src/core.c
+++ b/src/core.c
@@ -147,6 +147,7 @@ int box64_prefer_wrapped = 0;
 int box64_sse_flushto0 = 0;
 int box64_x87_no80bits = 0;
 int box64_sync_rounding = 0;
+int box64_sse42 = 1;
 int fix_64bit_inodes = 0;
 int box64_dummy_crashhandler = 1;
 int box64_mapclean = 0;
@@ -970,6 +971,15 @@ void LoadLogEnv()
             printf_log(LOG_INFO, "Disable the use of futex waitv syscall\n");
         #endif
     }
+    p = getenv("BOX64_SSE42");
+    if(p) {
+        if(strlen(p)==1) {
+            if(p[0]>='0' && p[0]<='0'+1)
+                box64_sse42 = p[0]-'0';
+        }
+        if(!box64_sse42)
+            printf_log(LOG_INFO, "Do not expose SSE 4.2 capabilities\n");
+    }
     p = getenv("BOX64_FIX_64BIT_INODES");
     if(p) {
         if(strlen(p)==1) {