Jit64: Use PPCSTATE reg if possible.
This commit is contained in:
parent
119dfbb436
commit
d4a529614a
|
@ -362,7 +362,7 @@ void Jit64::DoMergedBranch()
|
||||||
if (next.OPCD == 16) // bcx
|
if (next.OPCD == 16) // bcx
|
||||||
{
|
{
|
||||||
if (next.LK)
|
if (next.LK)
|
||||||
MOV(32, M(&LR), Imm32(nextPC + 4));
|
MOV(32, PPCSTATE(spr[SPR_LR]), Imm32(nextPC + 4));
|
||||||
|
|
||||||
u32 destination;
|
u32 destination;
|
||||||
if (next.AA)
|
if (next.AA)
|
||||||
|
@ -374,18 +374,18 @@ void Jit64::DoMergedBranch()
|
||||||
else if ((next.OPCD == 19) && (next.SUBOP10 == 528)) // bcctrx
|
else if ((next.OPCD == 19) && (next.SUBOP10 == 528)) // bcctrx
|
||||||
{
|
{
|
||||||
if (next.LK)
|
if (next.LK)
|
||||||
MOV(32, M(&LR), Imm32(nextPC + 4));
|
MOV(32, PPCSTATE(spr[SPR_LR]), Imm32(nextPC + 4));
|
||||||
MOV(32, R(RSCRATCH), M(&CTR));
|
MOV(32, R(RSCRATCH), PPCSTATE(spr[SPR_CTR]));
|
||||||
AND(32, R(RSCRATCH), Imm32(0xFFFFFFFC));
|
AND(32, R(RSCRATCH), Imm32(0xFFFFFFFC));
|
||||||
WriteExitDestInRSCRATCH(next.LK, nextPC + 4);
|
WriteExitDestInRSCRATCH(next.LK, nextPC + 4);
|
||||||
}
|
}
|
||||||
else if ((next.OPCD == 19) && (next.SUBOP10 == 16)) // bclrx
|
else if ((next.OPCD == 19) && (next.SUBOP10 == 16)) // bclrx
|
||||||
{
|
{
|
||||||
MOV(32, R(RSCRATCH), M(&LR));
|
MOV(32, R(RSCRATCH), PPCSTATE(spr[SPR_LR]));
|
||||||
if (!m_enable_blr_optimization)
|
if (!m_enable_blr_optimization)
|
||||||
AND(32, R(RSCRATCH), Imm32(0xFFFFFFFC));
|
AND(32, R(RSCRATCH), Imm32(0xFFFFFFFC));
|
||||||
if (next.LK)
|
if (next.LK)
|
||||||
MOV(32, M(&LR), Imm32(nextPC + 4));
|
MOV(32, PPCSTATE(spr[SPR_LR]), Imm32(nextPC + 4));
|
||||||
WriteBLRExit();
|
WriteBLRExit();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "Core/HW/DSP.h"
|
#include "Core/HW/DSP.h"
|
||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
#include "Core/PowerPC/Jit64/JitRegCache.h"
|
#include "Core/PowerPC/Jit64/JitRegCache.h"
|
||||||
|
#include "Core/PowerPC/Jit64Common/Jit64PowerPCState.h"
|
||||||
#include "Core/PowerPC/JitInterface.h"
|
#include "Core/PowerPC/JitInterface.h"
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
|
|
||||||
|
@ -355,7 +356,7 @@ void Jit64::dcbz(UGeckoInstruction inst)
|
||||||
SwitchToFarCode();
|
SwitchToFarCode();
|
||||||
SetJumpTarget(slow);
|
SetJumpTarget(slow);
|
||||||
}
|
}
|
||||||
MOV(32, M(&PC), Imm32(js.compilerPC));
|
MOV(32, PPCSTATE(pc), Imm32(js.compilerPC));
|
||||||
BitSet32 registersInUse = CallerSavedRegistersInUse();
|
BitSet32 registersInUse = CallerSavedRegistersInUse();
|
||||||
ABI_PushRegistersAndAdjustStack(registersInUse, 0);
|
ABI_PushRegistersAndAdjustStack(registersInUse, 0);
|
||||||
ABI_CallFunctionR(PowerPC::ClearCacheLine, RSCRATCH);
|
ABI_CallFunctionR(PowerPC::ClearCacheLine, RSCRATCH);
|
||||||
|
|
Loading…
Reference in New Issue