about summary refs log tree commit diff stats
path: root/src
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
parentfed73858c684602c15623a5172d789a0f7d8bfc2 (diff)
downloadbox64-5fb1ee033e630d875e0bc2f46f008caba002150f.tar.gz
box64-5fb1ee033e630d875e0bc2f46f008caba002150f.zip
[COSIM] Changed how F0 LOCK opcodes are skipped in COSIM
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/arm64/dynarec_arm64_f0.c2
-rw-r--r--src/emu/x64test.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_f0.c b/src/dynarec/arm64/dynarec_arm64_f0.c
index a38b051e..3e39369e 100644
--- a/src/dynarec/arm64/dynarec_arm64_f0.c
+++ b/src/dynarec/arm64/dynarec_arm64_f0.c
@@ -52,7 +52,7 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
 
 
     GETREX();
-    SKIPTEST(x1);   // DYNAREC_TEST doesn't work, by nature, on atomic opration
+    //SKIPTEST(x1);   // DYNAREC_TEST doesn't work, by nature, on atomic opration
 
     switch(opcode) {
         case 0x00:
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"};