about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorYang Liu <numbksco@gmail.com>2024-04-12 23:51:55 +0800
committerGitHub <noreply@github.com>2024-04-12 17:51:55 +0200
commitb95b99b3c9aa7cdda09684c672178988fbe4730b (patch)
tree5b29ab7f9fb0c4a8c6603cbf5bfb83092adf5455 /src
parent139197230d19e99122abc141fabb0fcafcd01767 (diff)
downloadbox64-b95b99b3c9aa7cdda09684c672178988fbe4730b.tar.gz
box64-b95b99b3c9aa7cdda09684c672178988fbe4730b.zip
[RV64_DYNAREC] Fixed 66 C7 MOV opcode (#1440)
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_66.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_66.c b/src/dynarec/rv64/dynarec_rv64_66.c
index edce9940..3de0df07 100644
--- a/src/dynarec/rv64/dynarec_rv64_66.c
+++ b/src/dynarec/rv64/dynarec_rv64_66.c
@@ -1029,9 +1029,8 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             INST_NAME("MOV Ew, Iw");
             nextop = F8;
             if(MODREG) {
-                ed = xRAX+(nextop&7)+(rex.b<<3);
-                ADDI(x1, xZR, -1);
-                SRLI(x1, x1, 48);
+                ed = xRAX + (nextop & 7) + (rex.b << 3);
+                LUI(x1, 0xffff0);
                 AND(ed, ed, x1);
                 u16 = F16;
                 MOV32w(x1, u16);