Jit: Use correct address when checking fifoWriteAddresses
We need to check for the address of the *previous* instruction, because checking fifoWriteAddresses happens not at the end of the instruction that triggered it but at the start of the next instruction.
This commit is contained in:
parent
32f4f3ae7c
commit
f7f4da2be8
|
@ -949,8 +949,12 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
|
||||||
js.isLastInstruction = true;
|
js.isLastInstruction = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i != 0)
|
||||||
|
{
|
||||||
// Gather pipe writes using a non-immediate address are discovered by profiling.
|
// Gather pipe writes using a non-immediate address are discovered by profiling.
|
||||||
bool gatherPipeIntCheck = js.fifoWriteAddresses.find(op.address) != js.fifoWriteAddresses.end();
|
const u32 prev_address = m_code_buffer[i - 1].address;
|
||||||
|
bool gatherPipeIntCheck =
|
||||||
|
js.fifoWriteAddresses.find(prev_address) != js.fifoWriteAddresses.end();
|
||||||
|
|
||||||
// Gather pipe writes using an immediate address are explicitly tracked.
|
// Gather pipe writes using an immediate address are explicitly tracked.
|
||||||
if (jo.optimizeGatherPipe &&
|
if (jo.optimizeGatherPipe &&
|
||||||
|
@ -997,6 +1001,7 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
|
||||||
SetJumpTarget(noCPInt);
|
SetJumpTarget(noCPInt);
|
||||||
SetJumpTarget(noExtIntEnable);
|
SetJumpTarget(noExtIntEnable);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (HandleFunctionHooking(op.address))
|
if (HandleFunctionHooking(op.address))
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1047,8 +1047,12 @@ bool JitArm64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
|
||||||
fpr_used[op.fregOut] = true;
|
fpr_used[op.fregOut] = true;
|
||||||
fpr.UpdateLastUsed(fpr_used);
|
fpr.UpdateLastUsed(fpr_used);
|
||||||
|
|
||||||
|
if (i != 0)
|
||||||
|
{
|
||||||
// Gather pipe writes using a non-immediate address are discovered by profiling.
|
// Gather pipe writes using a non-immediate address are discovered by profiling.
|
||||||
bool gatherPipeIntCheck = js.fifoWriteAddresses.find(op.address) != js.fifoWriteAddresses.end();
|
const u32 prev_address = m_code_buffer[i - 1].address;
|
||||||
|
bool gatherPipeIntCheck =
|
||||||
|
js.fifoWriteAddresses.find(prev_address) != js.fifoWriteAddresses.end();
|
||||||
|
|
||||||
if (jo.optimizeGatherPipe &&
|
if (jo.optimizeGatherPipe &&
|
||||||
(js.fifoBytesSinceCheck >= GPFifo::GATHER_PIPE_SIZE || js.mustCheckFifo))
|
(js.fifoBytesSinceCheck >= GPFifo::GATHER_PIPE_SIZE || js.mustCheckFifo))
|
||||||
|
@ -1071,7 +1075,8 @@ bool JitArm64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
|
||||||
|
|
||||||
// Inline exception check
|
// Inline exception check
|
||||||
LDR(IndexType::Unsigned, ARM64Reg::W30, PPC_REG, PPCSTATE_OFF(Exceptions));
|
LDR(IndexType::Unsigned, ARM64Reg::W30, PPC_REG, PPCSTATE_OFF(Exceptions));
|
||||||
FixupBranch no_ext_exception = TBZ(ARM64Reg::W30, MathUtil::IntLog2(EXCEPTION_EXTERNAL_INT));
|
FixupBranch no_ext_exception =
|
||||||
|
TBZ(ARM64Reg::W30, MathUtil::IntLog2(EXCEPTION_EXTERNAL_INT));
|
||||||
FixupBranch exception = B();
|
FixupBranch exception = B();
|
||||||
SwitchToFarCode();
|
SwitchToFarCode();
|
||||||
const u8* done_here = GetCodePtr();
|
const u8* done_here = GetCodePtr();
|
||||||
|
@ -1132,6 +1137,7 @@ bool JitArm64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
|
||||||
|
|
||||||
gpr.Unlock(WA);
|
gpr.Unlock(WA);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (HandleFunctionHooking(op.address))
|
if (HandleFunctionHooking(op.address))
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue