Skip to content

Commit

Permalink
[RV64_DYNAREC] Fixed 66 87 XCHG opcode (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
xctan authored Jan 13, 2024
1 parent 7146347 commit 4c174a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dynarec/rv64/dynarec_rv64_66.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,13 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
NOT(x5, x5);
SLLI(x5, x5, 16);
SLLI(x6, x6, 16);
// 0xffffffff0000ffff
NOT(x5, x5);
LR_W(x1, ed, 1, 0);
ANDI(x4, ed, ~0b11);
LR_W(x1, x4, 1, 0);
AND(x3, x1, x5);
OR(x3, x3, x6);
SC_W(x3, x3, ed, 0, 1);
SC_W(x3, x3, x4, 0, 1);
BNEZ(x3, -4 * 4);
SRLI(x1, x1, 16);
ZEXTH(x1, x1);
Expand Down

0 comments on commit 4c174a4

Please sign in to comment.