about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-02-11 11:31:31 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-02-11 11:31:31 +0100
commit5c01fbabac658d7d567efdff333a10bb2be5ca09 (patch)
tree742a88fd8340a100fb7b7cb6fb59dffd124873d4
parentfed47bea4acd8fcdd39356b84f5b16080f19fa65 (diff)
downloadbox64-5c01fbabac658d7d567efdff333a10bb2be5ca09.tar.gz
box64-5c01fbabac658d7d567efdff333a10bb2be5ca09.zip
[INTERPRETER] Improved FXAM handling
-rw-r--r--src/emu/x87emu_private.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/x87emu_private.h b/src/emu/x87emu_private.h
index 6b62fe48..ae977133 100644
--- a/src/emu/x87emu_private.h
+++ b/src/emu/x87emu_private.h
@@ -128,7 +128,7 @@ static inline double fpu_round(x64emu_t* emu, double d) {
 
 static inline void fpu_fxam(x64emu_t* emu) {
     emu->sw.f.F87_C1 = (ST0.ud[1]&0x80000000)?1:0;
-    if(emu->fpu_stack<=0) {
+    if((emu->fpu_stack<=0) || (emu->p_regs[(emu->top)&7].tag == 0b11)) {
         //Empty
         emu->sw.f.F87_C3 = 1;
         emu->sw.f.F87_C2 = 0;