From 509a1bf56e08d2755b57a6f8fa4c4237169abeaf Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Mon, 29 Mar 2021 17:24:32 +0200 Subject: Try to sistematicaly erase upper RAX on cmpxchg opcode --- src/emu/x64run0f.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/emu/x64run0f.c b/src/emu/x64run0f.c index 667dbb1f..048e1a40 100644 --- a/src/emu/x64run0f.c +++ b/src/emu/x64run0f.c @@ -684,13 +684,12 @@ int Run0F(x64emu_t *emu, rex_t rex) } } else { cmp32(emu, R_EAX, ED->dword[0]); + R_RAX = ED->dword[0]; // to erase upper part of RAX if(ACCESS_FLAG(F_ZF)) { if(MODREG) ED->q[0] = GD->dword[0]; else ED->dword[0] = GD->dword[0]; - } else { - R_RAX = ED->dword[0]; } } break; -- cgit 1.4.1