about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-04 21:26:55 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-04 21:26:55 +0100
commit234186e9afd27180e9bc77658e68b05b47a0cd8f (patch)
treec996a94b29d5de6ec8370b1062bb79a7ae32805f /src
parentcb24986c88f948c7d19c25c56608b70a7b1ed8ec (diff)
downloadbox64-234186e9afd27180e9bc77658e68b05b47a0cd8f.tar.gz
box64-234186e9afd27180e9bc77658e68b05b47a0cd8f.zip
Added C9 LEAVE opcode (and test02 works too)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/emu/x64run.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/emu/x64run.c b/src/emu/x64run.c
index d245eda5..80a96b2c 100755
--- a/src/emu/x64run.c
+++ b/src/emu/x64run.c
@@ -472,6 +472,11 @@ x64emurun:
                 ED->dword[0] = F32;
             break;
 
+        case 0xC9:                      /* LEAVE */
+            R_RSP = R_RBP;
+            R_RBP = Pop(emu);
+            break;
+
         case 0xCC:                      /* INT 3 */
             x64Int3(emu);
             if(emu->quit) goto fini;