CPU/Recompiler: Fix PGXP values getting corrupted if cached in caller-saved reg
This commit is contained in:
parent
3f937a2a39
commit
e1579584ef
|
@ -1324,13 +1324,14 @@ bool CodeGenerator::Compile_Store(const CodeBlockInstruction& cbi)
|
|||
{
|
||||
case InstructionOp::sb:
|
||||
{
|
||||
EmitStoreGuestMemory(cbi, address, address_spec, value.ViewAsSize(RegSize_8));
|
||||
if (g_settings.gpu_pgxp_enable)
|
||||
{
|
||||
EmitFunctionCall(nullptr, PGXP::CPU_SB, Value::FromConstantU32(cbi.instruction.bits),
|
||||
value.ViewAsSize(RegSize_8), address);
|
||||
}
|
||||
|
||||
EmitStoreGuestMemory(cbi, address, address_spec, value.ViewAsSize(RegSize_8));
|
||||
|
||||
if (address_spec)
|
||||
{
|
||||
const VirtualMemoryAddress aligned_addr = (*address_spec & ~3u);
|
||||
|
@ -1354,13 +1355,14 @@ bool CodeGenerator::Compile_Store(const CodeBlockInstruction& cbi)
|
|||
|
||||
case InstructionOp::sh:
|
||||
{
|
||||
EmitStoreGuestMemory(cbi, address, address_spec, value.ViewAsSize(RegSize_16));
|
||||
if (g_settings.gpu_pgxp_enable)
|
||||
{
|
||||
EmitFunctionCall(nullptr, PGXP::CPU_SH, Value::FromConstantU32(cbi.instruction.bits),
|
||||
value.ViewAsSize(RegSize_16), address);
|
||||
}
|
||||
|
||||
EmitStoreGuestMemory(cbi, address, address_spec, value.ViewAsSize(RegSize_16));
|
||||
|
||||
if (address_spec)
|
||||
{
|
||||
const VirtualMemoryAddress aligned_addr = (*address_spec & ~3u);
|
||||
|
@ -1384,10 +1386,11 @@ bool CodeGenerator::Compile_Store(const CodeBlockInstruction& cbi)
|
|||
|
||||
case InstructionOp::sw:
|
||||
{
|
||||
EmitStoreGuestMemory(cbi, address, address_spec, value);
|
||||
if (g_settings.gpu_pgxp_enable)
|
||||
EmitFunctionCall(nullptr, PGXP::CPU_SW, Value::FromConstantU32(cbi.instruction.bits), value, address);
|
||||
|
||||
EmitStoreGuestMemory(cbi, address, address_spec, value);
|
||||
|
||||
if (address_spec)
|
||||
SpeculativeWriteMemory(*address_spec, value_spec);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue