about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-11-09 10:56:20 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-11-09 10:56:20 +0100
commit3a40b9f3a3741de127997263ee3821d0b29d4b48 (patch)
tree3d4009b697fa813ce5efef6735329987089a330e /src
parentd8805b6af72a8297e35170b5fe8aab26a972d82e (diff)
downloadbox64-3a40b9f3a3741de127997263ee3821d0b29d4b48.tar.gz
box64-3a40b9f3a3741de127997263ee3821d0b29d4b48.zip
More accurate 0F BA opcodes on 64bits without rex.w
Diffstat (limited to 'src')
-rw-r--r--src/emu/x64run0f.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/emu/x64run0f.c b/src/emu/x64run0f.c
index e8a047f2..36482ca3 100644
--- a/src/emu/x64run0f.c
+++ b/src/emu/x64run0f.c
@@ -1139,6 +1139,8 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
                             ED->dword[0] ^= (1<<tmp8u);

                             CLEAR_FLAG(F_CF);

                         }

+                        if(MODREG)

+                            ED->dword[1] = 0;

                     }

                     break;

                 case 6:             /* BTR Ed, Ib */

@@ -1159,6 +1161,8 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
                             ED->dword[0] ^= (1<<tmp8u);

                         } else

                             CLEAR_FLAG(F_CF);

+                        if(MODREG)

+                            ED->dword[1] = 0;

                     }

                     break;

                 case 7:             /* BTC Ed, Ib */

@@ -1179,6 +1183,8 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
                         else

                             CLEAR_FLAG(F_CF);

                         ED->dword[0] ^= (1<<tmp8u);

+                        if(MODREG)

+                            ED->dword[1] = 0;

                     }

                     break;