Permalink
Browse files

x64: Avoid clobbering jr dest in cases.

  • Loading branch information...
unknownbrackets committed Jul 8, 2017
1 parent 79a6690 commit 3dacd323c838d9e5819e55b7ec54d5ddf21fb600
Showing with 3 additions and 2 deletions.
  1. +3 −2 Core/MIPS/x86/Jit.cpp
View
@@ -714,8 +714,9 @@ void Jit::WriteExitDestInReg(X64Reg reg) {
if (RipAccessible((const void *)coreState)) {
CMP(32, M(&coreState), Imm32(CORE_NEXTFRAME)); // rip accessible
} else {
MOV(PTRBITS, R(RAX), ImmPtr((const void *)&coreState));
CMP(32, MatR(RAX), Imm32(CORE_NEXTFRAME));
X64Reg temp = reg == RAX ? RDX : RAX;
MOV(PTRBITS, R(temp), ImmPtr((const void *)&coreState));
CMP(32, MatR(temp), Imm32(CORE_NEXTFRAME));
}
FixupBranch skipCheck = J_CC(CC_LE);
MOV(32, MIPSSTATE_VAR(pc), Imm32(GetCompilerPC()));

0 comments on commit 3dacd32

Please sign in to comment.