about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-06-22 18:05:03 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-06-22 18:05:03 +0200
commitdc2d54edf26dc266e4787b30fa796a4db1339936 (patch)
treec8c9a6eb3d7058fa7b65219d29998444b3f59462 /src/emu
parentd39c55454182d689ee923e19e1c52a187daaa8ae (diff)
downloadbox64-dc2d54edf26dc266e4787b30fa796a4db1339936.tar.gz
box64-dc2d54edf26dc266e4787b30fa796a4db1339936.zip
Added 66 F2/F3 A4 opcode ({DYNAREC] too)
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/x64run66.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/emu/x64run66.c b/src/emu/x64run66.c
index 536583bc..17199c71 100644
--- a/src/emu/x64run66.c
+++ b/src/emu/x64run66.c
@@ -477,7 +477,20 @@ uintptr_t Run66(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
                 *(uint16_t*)F64 = R_AX;

         }

         break;

-

+    case 0xA4:                      /* (REP) MOVSB */

+        tmp8s = ACCESS_FLAG(F_DF)?-1:+1;

+        tmp64u = (rep)?R_RCX:1L;

+        while(tmp64u) {

+            #ifndef TEST_INTERPRETER

+            *(uint8_t*)R_RDI = *(uint8_t*)R_RSI;

+            #endif

+            R_RDI += tmp8s;

+            R_RSI += tmp8s;

+            --tmp64u;

+        }

+        if(rep)

+            R_RCX = tmp64u;

+        break;

     case 0xA5:              /* (REP) MOVSW */

         tmp8s = ACCESS_FLAG(F_DF)?-1:+1;

         tmp64u = (rep)?R_RCX:1L;