Permalink
Browse files

Merge pull request #7361 from BhaaLseN/jit-global

Jit64: get rid of global g_jit accesses
  • Loading branch information...
lioncash committed Aug 25, 2018
2 parents 476037d + 5f95ed5 commit 31b4461ff6cdedd3ef557b4bcc0874c21975fec4
Showing with 3 additions and 3 deletions.
  1. +3 −3 Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp
@@ -72,7 +72,7 @@ void Jit64::psq_stXX(UGeckoInstruction inst)
else
{
// Stash PC in case asm_routine causes exception
MOV(32, PPCSTATE(pc), Imm32(g_jit->js.compilerPC));
MOV(32, PPCSTATE(pc), Imm32(js.compilerPC));
// We know what GQR is here, so we can load RSCRATCH2 and call into the store method directly
// with just the scale bits.
MOV(32, R(RSCRATCH2), Imm32(gqrValue & 0x3F00));
@@ -86,7 +86,7 @@ void Jit64::psq_stXX(UGeckoInstruction inst)
else
{
// Stash PC incase asm_routine causes exception
MOV(32, PPCSTATE(pc), Imm32(g_jit->js.compilerPC));
MOV(32, PPCSTATE(pc), Imm32(js.compilerPC));
// Some games (e.g. Dirt 2) incorrectly set the unused bits which breaks the lookup table code.
// Hence, we need to mask out the unused bits. The layout of the GQR register is
// UU[SCALE]UUUUU[TYPE] where SCALE is 6 bits and TYPE is 3 bits, so we have to AND with
@@ -154,7 +154,7 @@ void Jit64::psq_lXX(UGeckoInstruction inst)
else
{
// Stash PC in case asm_routine causes exception
MOV(32, PPCSTATE(pc), Imm32(g_jit->js.compilerPC));
MOV(32, PPCSTATE(pc), Imm32(js.compilerPC));
// Get the high part of the GQR register
OpArg gqr = PPCSTATE(spr[SPR_GQR0 + i]);
gqr.AddMemOffset(2);

0 comments on commit 31b4461

Please sign in to comment.