Skip to content

Commit

Permalink
[RV64_DYNAREC] Added unaligned codegen for MOVSW (#2296)
Browse files Browse the repository at this point in the history
  • Loading branch information
xctan authored Jan 25, 2025
1 parent 6f8f37e commit 9e58047
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/dynarec/rv64/dynarec_rv64_66.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,13 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
INST_NAME("MOVSW");
GETDIR(x3, x1, 2);
LH(x1, xRSI, 0);
SH(x1, xRDI, 0);
IF_UNALIGNED(ip) {
SB(x1, xRDI, 0);
SRLI(x1, x1, 8);
SB(x1, xRDI, 1);
} else {
SH(x1, xRDI, 0);
}
ADD(xRSI, xRSI, x3);
ADD(xRDI, xRDI, x3);
}
Expand Down

0 comments on commit 9e58047

Please sign in to comment.