about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorZoHan <114734429+LiZhuoheng-coder@users.noreply.github.com>2024-04-17 15:27:50 +0800
committerGitHub <noreply@github.com>2024-04-17 09:27:50 +0200
commitd4e32fdbc0a971ce5c6f2880b38df7789b9d64a5 (patch)
tree393c4ee20a3a6b44e86c31c51d8dab3f1b889a93 /src
parent067cf75c658c632b7c476036e6b21d985cbe67a2 (diff)
downloadbox64-d4e32fdbc0a971ce5c6f2880b38df7789b9d64a5.tar.gz
box64-d4e32fdbc0a971ce5c6f2880b38df7789b9d64a5.zip
[RV64_DYNAREC] Added more opcodes (#1451)
* [RV64_DYNAREC] Added more opcodes

* modify the format
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_66.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_66.c b/src/dynarec/rv64/dynarec_rv64_66.c
index 3de0df07..f9538fbf 100644
--- a/src/dynarec/rv64/dynarec_rv64_66.c
+++ b/src/dynarec/rv64/dynarec_rv64_66.c
@@ -86,6 +86,17 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             AND(xRAX, xRAX, x3);
             OR(xRAX, xRAX, x1);
             break;
+        case 0x06:
+            INST_NAME("PUSH ES");
+            LHU(x1, xEmu, offsetof(x64emu_t, segs[_ES]));
+            PUSH1_16(x1);
+            break;
+        case 0x07:
+            INST_NAME("POP ES");
+            POP1_16(x1);
+            SH(x1, xEmu, offsetof(x64emu_t, segs[_ES]));
+            SW(xZR, xEmu, offsetof(x64emu_t, segs_serial[_ES]));
+            break;
         case 0x09:
             INST_NAME("OR Ew, Gw");
             SETFLAGS(X_ALL, SF_SET_PENDING);
@@ -191,6 +202,17 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             SLLI(xRAX, xRAX, 16);
             OR(xRAX, xRAX, x1);
             break;
+        case 0x1E:
+            INST_NAME("PUSH DS");
+            LHU(x1, xEmu, offsetof(x64emu_t, segs[_DS]));
+            PUSH1_16(x1);
+            break;
+        case 0x1F:
+            INST_NAME("POP DS");
+            POP1_16(x1);
+            SH(x1, xEmu, offsetof(x64emu_t, segs[_DS]));
+            SW(xZR, xEmu, offsetof(x64emu_t, segs_serial[_DS]));
+            break;
         case 0x21:
             INST_NAME("AND Ew, Gw");
             SETFLAGS(X_ALL, SF_SET_PENDING);