about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-01-10 15:50:32 +0100
committerptitSeb <sebastien.chev@gmail.com>2025-01-10 15:50:32 +0100
commitb7f14ff33869397abcfebbf12b69a7b0d65c73d7 (patch)
tree6a0547bfa205b95959237637fdab4abb784ff58d
parent86211e5970617bff46b3632c28fd0f0913f5235f (diff)
downloadbox64-b7f14ff33869397abcfebbf12b69a7b0d65c73d7.tar.gz
box64-b7f14ff33869397abcfebbf12b69a7b0d65c73d7.zip
[INTERPRETER] Small cosmetic fix for D2LD helper function
-rw-r--r--src/emu/x87emu_private.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/x87emu_private.c b/src/emu/x87emu_private.c
index 21090ce8..260a2be1 100644
--- a/src/emu/x87emu_private.c
+++ b/src/emu/x87emu_private.c
@@ -197,9 +197,9 @@ void D2LD(void* d, void* ld)
         if(exp80!=0){ 
             mant80final |= 0x8000000000000000L;
             exp80final += (BIAS80 - BIAS64);
-        } else if(mant80final!=0) {
-            // denormals -> normal
-            exp80final = BIAS80-1023;
+        } else {
+            // denormals -> normal (the case of 0 has been dealt with already)
+            exp80final = BIAS80-BIAS64;
             int one = __builtin_clz(mant80final) + 1;
             exp80final -= one;
             mant80final<<=one;