about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-06-24 14:49:28 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-06-24 14:49:28 +0200
commit9ea02922eea037e1f16f490141d63bc1b77ce9f4 (patch)
treedea442721db7623e54cbaa68f7bacdeebf105fbf /src/emu
parent816cbc74f44fd273d09ab4aff69085115e4c588b (diff)
downloadbox64-9ea02922eea037e1f16f490141d63bc1b77ce9f4.tar.gz
box64-9ea02922eea037e1f16f490141d63bc1b77ce9f4.zip
[32BITS] Added 66/61 opcodes ([ARM64_DYNAREC] too)
Diffstat (limited to 'src/emu')
-rwxr-xr-xsrc/emu/x64run.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/emu/x64run.c b/src/emu/x64run.c
index 8e611920..3c6808de 100755
--- a/src/emu/x64run.c
+++ b/src/emu/x64run.c
@@ -299,6 +299,37 @@ x64emurun:
             tmp8u = (opcode&7)+(rex.b<<3);
             emu->regs[tmp8u].q[0] = is32bits?Pop32(emu):Pop(emu);
             break;
+        case 0x60:                      /* PUSHAD */
+            if(rex.is32bits) {
+                tmp32u = R_ESP;
+                Push(emu, R_EAX);
+                Push(emu, R_ECX);
+                Push(emu, R_EDX);
+                Push(emu, R_EBX);
+                Push(emu, tmp32u);
+                Push(emu, R_EBP);
+                Push(emu, R_ESI);
+                Push(emu, R_EDI);
+            } else {
+                unimp = 1;
+                goto fini;
+            }
+            break;
+        case 0x61:                      /* POPAD */
+            if(rex.is32bits) {
+                R_EDI = Pop(emu);
+                R_ESI = Pop(emu);
+                R_EBP = Pop(emu);
+                R_ESP+=4;   // POP ESP
+                R_EBX = Pop(emu);
+                R_EDX = Pop(emu);
+                R_ECX = Pop(emu);
+                R_EAX = Pop(emu);
+            } else {
+                unimp = 1;
+                goto fini;
+            }
+            break;
 
         case 0x63:                      /* MOVSXD Gd,Ed */
             nextop = F8;