about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2023-10-25 20:14:11 +0800
committerGitHub <noreply@github.com>2023-10-25 14:14:11 +0200
commit87bf751b115267d7c388c849c43fca6d3f0d0881 (patch)
treeedc6f3976538daf8dd1d9a49694d4bda19ef591d /src/main.c
parent12c40a5b804143cee0d538c4de4b526522bcfcd2 (diff)
downloadbox64-87bf751b115267d7c388c849c43fca6d3f0d0881.tar.gz
box64-87bf751b115267d7c388c849c43fca6d3f0d0881.zip
[INTERP] Fix fpu_round (#1030)
* [INTERP] Fix fpu_round

* Should be working this time

* Handling wrappedlibm

* Format

* Fix loongarch

* Make it optional

* Fix android build
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index bc4a12e4..eb185c66 100644
--- a/src/main.c
+++ b/src/main.c
@@ -123,6 +123,7 @@ int box64_prefer_emulated = 0;
 int box64_prefer_wrapped = 0;
 int box64_sse_flushto0 = 0;
 int box64_x87_no80bits = 0;
+int box64_sync_rounding = 0;
 int fix_64bit_inodes = 0;
 int box64_dummy_crashhandler = 1;
 int box64_mapclean = 0;
@@ -1155,6 +1156,12 @@ void LoadEnvVars(box64context_t *context)
             printf_log(LOG_INFO, "BOX64: all 80bits x87 long double will be handle as double\n");
     	}
     }
+    if(getenv("BOX64_SYNC_ROUNDING")) {
+        if (strcmp(getenv("BOX64_SYNC_ROUNDING"), "1")==0) {
+            box64_sync_rounding = 1;
+            printf_log(LOG_INFO, "BOX64: rouding mode with be synced with fesetround/fegetround\n");
+    	}
+    }
     if(getenv("BOX64_PREFER_WRAPPED")) {
         if (strcmp(getenv("BOX64_PREFER_WRAPPED"), "1")==0) {
             box64_prefer_wrapped = 1;