mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
ArmJit: Save/restore downcount where needed, we missed a few cases.
This commit is contained in:
parent
a34e32abe1
commit
df5b51990d
@ -497,7 +497,9 @@ bool ArmJit::ReplaceJalTo(u32 dest) {
|
||||
gpr.SetImm(MIPS_REG_RA, GetCompilerPC() + 8);
|
||||
CompileDelaySlot(DELAYSLOT_NICE);
|
||||
FlushAll();
|
||||
SaveDowncount();
|
||||
RestoreRoundingMode();
|
||||
|
||||
if (BLInRange((const void *)(entry->replaceFunc))) {
|
||||
BL((const void *)(entry->replaceFunc));
|
||||
} else {
|
||||
@ -505,6 +507,8 @@ bool ArmJit::ReplaceJalTo(u32 dest) {
|
||||
BL(R0);
|
||||
}
|
||||
ApplyRoundingMode();
|
||||
RestoreDowncount();
|
||||
|
||||
WriteDownCountR(R0);
|
||||
}
|
||||
|
||||
@ -745,6 +749,7 @@ bool ArmJit::CheckJitBreakpoint(u32 addr, int downcountOffset) {
|
||||
FlushAll();
|
||||
MOVI2R(SCRATCHREG1, GetCompilerPC());
|
||||
MovToPC(SCRATCHREG1);
|
||||
SaveDowncount();
|
||||
RestoreRoundingMode();
|
||||
MOVI2R(R0, addr);
|
||||
QuickCallFunction(SCRATCHREG2, &JitBreakpoint);
|
||||
@ -754,6 +759,7 @@ bool ArmJit::CheckJitBreakpoint(u32 addr, int downcountOffset) {
|
||||
FixupBranch skip = B_CC(CC_EQ);
|
||||
WriteDownCount(downcountOffset);
|
||||
ApplyRoundingMode();
|
||||
RestoreDowncount();
|
||||
B((const void *)dispatcherCheckCoreState);
|
||||
SetJumpTarget(skip);
|
||||
|
||||
@ -771,6 +777,7 @@ bool ArmJit::CheckMemoryBreakpoint(int instructionOffset) {
|
||||
|
||||
MRS(R8);
|
||||
FlushAll();
|
||||
SaveDowncount();
|
||||
RestoreRoundingMode();
|
||||
MOVI2R(R0, GetCompilerPC());
|
||||
MovToPC(R0);
|
||||
@ -783,6 +790,7 @@ bool ArmJit::CheckMemoryBreakpoint(int instructionOffset) {
|
||||
FixupBranch skip = B_CC(CC_EQ);
|
||||
WriteDownCount(-1 - off);
|
||||
ApplyRoundingMode();
|
||||
RestoreDowncount();
|
||||
B((const void *)dispatcherCheckCoreState);
|
||||
SetJumpTarget(skip);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user