about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-02-17 09:37:50 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-02-17 09:37:50 +0100
commitaa279c332d9169d2552f7d99e210636cab57a21b (patch)
treee98a01113374785be9c5eef25cb5b19ae79d914b /src
parenta79e1be034be8e3d35bed08ff0ff11e27bc388d2 (diff)
downloadbox64-aa279c332d9169d2552f7d99e210636cab57a21b.tar.gz
box64-aa279c332d9169d2552f7d99e210636cab57a21b.zip
Better handling of 26/2E/36/3E prefix on F0 prefixed opcode ([ARM64_DYNAREC] too)
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/arm64/dynarec_arm64_f0.c4
-rw-r--r--src/emu/x64runf0.c3
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 890775ae..daded2ef 100644
--- a/src/dynarec/arm64/dynarec_arm64_f0.c
+++ b/src/dynarec/arm64/dynarec_arm64_f0.c
@@ -46,6 +46,10 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
         rep = opcode-0xF1;
         opcode = F8;
     }
+    while((opcode==0x36) || (opcode==0x2e) || (opcode==0x3E) || (opcode==0x26)) {
+        opcode = F8;
+    }
+
 
     GETREX();
 
diff --git a/src/emu/x64runf0.c b/src/emu/x64runf0.c
index 29ca7a71..77691a67 100644
--- a/src/emu/x64runf0.c
+++ b/src/emu/x64runf0.c
@@ -48,8 +48,9 @@ uintptr_t RunF0(x64emu_t *emu, rex_t rex, uintptr_t addr)
     #endif

 

     opcode = F8;

-    while(opcode==0x2E) // ignoring CS: prefix

+    while((opcode==0x36) || (opcode==0x2E) || (opcode==0x3E) || (opcode==0x26))

         opcode = F8;

+

     // REX prefix before the F0 are ignored

     rex.rex = 0;

     if(!rex.is32bits)