about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedlibm.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-01-21 23:13:51 +0800
committerGitHub <noreply@github.com>2025-01-21 16:13:51 +0100
commit044dec0bfa0f3f8f62f7703d6b0a8600c1354dc5 (patch)
treedc41c611965cec299dcb62185c5fba4935b6251f /src/wrapped/wrappedlibm.c
parented8b6fe9db863a8d9e473a645e84700c7291bb06 (diff)
downloadbox64-044dec0bfa0f3f8f62f7703d6b0a8600c1354dc5.tar.gz
box64-044dec0bfa0f3f8f62f7703d6b0a8600c1354dc5.zip
[ENV] Initial refactor of env variables infrastructure (#2274)
* [ENV] Initial refactor of env variables infrastructure

* Ported BOX64_DYNAREC_LOG

* Ported more options

* Ported BOX64_MALLOC_HACK

* Ported BOX64_DYNAREC_TEST

* Ported more options

* Ported more options

* Ported more options

* Ported all options

* Removed old rcfile parser

* Fix

* review

* fix

* fix

* more fixes
Diffstat (limited to 'src/wrapped/wrappedlibm.c')
-rw-r--r--src/wrapped/wrappedlibm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wrapped/wrappedlibm.c b/src/wrapped/wrappedlibm.c
index e190f9ed..8a7273ec 100644
--- a/src/wrapped/wrappedlibm.c
+++ b/src/wrapped/wrappedlibm.c
@@ -130,7 +130,7 @@ F2D(fmod)
 // See https://github.com/bminor/glibc/blob/master/sysdeps/x86_64/fpu/fesetround.c
 EXPORT int my_fesetround(x64emu_t* emu, int round)
 {
-    if (box64_sync_rounding) {
+    if (BOX64ENV(sync_rounding)) {
         if ((round & ~0xc00) != 0)
             // round is not valid.
             return 1;
@@ -150,7 +150,7 @@ EXPORT int my_fesetround(x64emu_t* emu, int round)
 // See https://github.com/bminor/glibc/blob/master/sysdeps/x86_64/fpu/fegetround.c
 EXPORT int my_fegetround(x64emu_t* emu)
 {
-    if (box64_sync_rounding) {
+    if (BOX64ENV(sync_rounding)) {
         return emu->cw.x16 & 0xc00;
     } else {
         return fegetround();
@@ -160,7 +160,7 @@ EXPORT int my_fegetround(x64emu_t* emu)
 #define FROUND(N, T, R)                      \
     EXPORT R my_##N(x64emu_t* emu, T val)    \
     {                                        \
-        if (box64_sync_rounding) {           \
+        if (BOX64ENV(sync_rounding)) {           \
             int round = emu->cw.x16 & 0xc00; \
             fesetround(TO_NATIVE(round));    \
         }                                    \
@@ -180,7 +180,7 @@ FROUND(llrintl, long double, long double)
 #else
 EXPORT double my_llrintl(x64emu_t* emu, double val)
 {
-    if (box64_sync_rounding) {
+    if (BOX64ENV(sync_rounding)) {
         int round = emu->cw.x16 & 0xc00;
         fesetround(TO_NATIVE(round));
     }