Skip to content

Commit

Permalink
CPU/Recompiler: Fix dispatcher crash on RISCV64
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Dec 31, 2024
1 parent a4b3596 commit 4c08c71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/cpu_recompiler_riscv64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ u32 CPU::CodeCache::EmitASMFunctions(void* code, u32 code_size)
rvAsm->SLLI(RARG2, RARG2, 3);
rvAsm->ADD(RARG2, RARG2, RARG3);
rvAsm->LD(RARG2, 0, RARG2);
rvAsm->SLLI(RARG1, RARG1, 48); // idx = (pc & 0xFFFF) >> 2
rvAsm->SRLI(RARG1, RARG1, 50);
rvAsm->SLLI64(RARG1, RARG1, 48); // idx = (pc & 0xFFFF) >> 2
rvAsm->SRLI64(RARG1, RARG1, 50);
rvAsm->SLLI(RARG1, RARG1, 3);

// blr(x9[pc * 2]) (fast_map[idx])
Expand Down

0 comments on commit 4c08c71

Please sign in to comment.