about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-03-26 18:14:23 +0100
committerptitSeb <sebastien.chev@gmail.com>2025-03-26 18:14:23 +0100
commit5fb1ee033e630d875e0bc2f46f008caba002150f (patch)
tree1cb86496b56adc9f2f992ae2a0c4d56d97ee6f61 /src/emu
parentfed73858c684602c15623a5172d789a0f7d8bfc2 (diff)
downloadbox64-5fb1ee033e630d875e0bc2f46f008caba002150f.tar.gz
box64-5fb1ee033e630d875e0bc2f46f008caba002150f.zip
[COSIM] Changed how F0 LOCK opcodes are skipped in COSIM
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/x64test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/emu/x64test.c b/src/emu/x64test.c
index fc468ee0..84f2e503 100644
--- a/src/emu/x64test.c
+++ b/src/emu/x64test.c
@@ -46,6 +46,11 @@ void x64test_check(x64emu_t* ref, uintptr_t ip)
     int banner = 0;
     x64test_t* test = &ref->test;
     x64emu_t* emu = test->emu;
+    if(((uint8_t*)ref->old_ip)[0]==0xf0) {
+        // LOCK opcode creates a lot of false positive, so just ignore it
+        CopyEmu(emu, ref);
+        return;
+    }
     if(memcmp(ref->regs, emu->regs, sizeof(emu->regs))) {
         static const char* regname[] = {"RAX", "RCX", "RDX", "RBX", "RSP", "RBP", "RSI", "RDI",
                                         " R8", " R9", "R10", "R11", "R12", "R13", "R14", "R15"};