about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-11-20 12:31:04 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-11-20 12:31:04 +0100
commitd3b44f1c84c42c52b401b357a3765f8e9ffdca17 (patch)
tree728cc77cad9c91d4ddbc79a34df1958c630a064f /src
parent8e74746573c0fdaf9d437708facea837086f0a0d (diff)
downloadbox64-d3b44f1c84c42c52b401b357a3765f8e9ffdca17.tar.gz
box64-d3b44f1c84c42c52b401b357a3765f8e9ffdca17.zip
[INTERPRETER] Fixed some rare issue with XLAT ocpode
Diffstat (limited to 'src')
-rw-r--r--src/emu/x64run.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/emu/x64run.c b/src/emu/x64run.c
index 0edfcc08..6548f6b3 100644
--- a/src/emu/x64run.c
+++ b/src/emu/x64run.c
@@ -1563,7 +1563,10 @@ x64emurun:
             };
             break;
         case 0xD7:                      /* XLAT */
-            R_AL = *(uint8_t*)(R_RBX + R_AL);
+            if(rex.w || rex.is32bits)
+                R_AL = *(uint8_t*)(R_RBX + R_AL);
+            else
+                R_AL = *(uint8_t*)((uintptr_t)R_EBX + R_AL);
             break;
         case 0xD8:                      /* x87 opcodes */
             #ifdef TEST_INTERPRETER