about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-03-18 09:27:43 +0000
committerptitSeb <sebastien.chev@gmail.com>2023-03-18 09:27:43 +0000
commitd8e30eb79331c84a400c4c02622cc5efbc29d473 (patch)
tree145fc94ec8e060bbf0f95db3cac97e2b3604a25f
parent2c903dcb676e5d7d1e03a9e9810c85bf8d141e1a (diff)
downloadbox64-d8e30eb79331c84a400c4c02622cc5efbc29d473.tar.gz
box64-d8e30eb79331c84a400c4c02622cc5efbc29d473.zip
[RV64_DYNAREC] Added 0F BF MOVSX opcode
-rw-r--r--src/dynarec/rv64/dynarec_rv64_0f.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_0f.c b/src/dynarec/rv64/dynarec_rv64_0f.c
index f2c684ab..7a047770 100644
--- a/src/dynarec/rv64/dynarec_rv64_0f.c
+++ b/src/dynarec/rv64/dynarec_rv64_0f.c
@@ -370,6 +370,22 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             if(!rex.w)
                 ZEROUP(gd);
             break;
+        case 0xBF:
+            INST_NAME("MOVSX Gd, Ew");
+            nextop = F8;
+            GETGD;
+            if(MODREG) {
+                ed = xRAX+(nextop&7)+(rex.b<<3);
+                SLLI(gd, ed, 48);
+                SRLI(gd, gd, 48);
+            } else {
+                SMREAD();
+                addr = geted(dyn, addr, ninst, nextop, &ed, x3, x1, &fixedaddress, rex, NULL, 1, 0);
+                LH(gd, ed, fixedaddress);
+            }
+            if(!rex.w)
+                ZEROUP(gd);
+            break;
 
         default:
             DEFAULT;