about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-03-18 08:20:21 +0000
committerptitSeb <sebastien.chev@gmail.com>2023-03-18 08:20:21 +0000
commit15c051e3adeca45c0fff81e4656f47f5c411a741 (patch)
treeb62b41aba95d4f61921b17c89f961b906f031720 /src
parent6ee2fbf88c986c1073748dfbcd7f9eb414791119 (diff)
downloadbox64-15c051e3adeca45c0fff81e4656f47f5c411a741.tar.gz
box64-15c051e3adeca45c0fff81e4656f47f5c411a741.zip
[RV64_DYNAREC] Added 63 MOVSXD opcode
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_00.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_00.c b/src/dynarec/rv64/dynarec_rv64_00.c
index e6b5bbbc..a14991cc 100644
--- a/src/dynarec/rv64/dynarec_rv64_00.c
+++ b/src/dynarec/rv64/dynarec_rv64_00.c
@@ -161,6 +161,29 @@ uintptr_t dynarec64_00(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             }
             break;
 
+        case 0x63:
+            INST_NAME("MOVSXD Gd, Ed");
+            nextop = F8;
+            GETGD;
+            if(rex.w) {
+                if(MODREG) {   // reg <= reg
+                    MV(gd, xRAX+(nextop&7)+(rex.b<<3));
+                } else {                    // mem <= reg
+                    SMREAD();
+                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                    LW(gd, ed, fixedaddress);
+                }
+            } else {
+                if(MODREG) {   // reg <= reg
+                    AND(gd, xRAX+(nextop&7)+(rex.b<<3), xMASK);
+                } else {                    // mem <= reg
+                    SMREAD();
+                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                    LWU(gd, ed, fixedaddress);
+                }
+            }
+            break;
+            
         case 0x66:
             addr = dynarec64_66(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
             break;