mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-02 11:43:31 +00:00
Check downcount in jit after a syscall.
This commit is contained in:
parent
b1bbbc44fc
commit
c1757ee166
@ -115,6 +115,10 @@ void Jit::GenerateFixedCode()
|
||||
|
||||
dispatcherCheckCoreState = GetCodePtr();
|
||||
|
||||
// The result of slice decrementation should be in flags if somebody jumped here
|
||||
// IMPORTANT - We jump on negative, not carry!!!
|
||||
FixupBranch bailCoreState = B_CC(CC_MI);
|
||||
|
||||
ARMABI_MOVI2R(R0, (u32)&coreState);
|
||||
LDR(R0, R0);
|
||||
CMP(R0, 0);
|
||||
@ -158,6 +162,7 @@ void Jit::GenerateFixedCode()
|
||||
B(dispatcherNoCheck); // no point in special casing this
|
||||
|
||||
SetJumpTarget(bail);
|
||||
SetJumpTarget(bailCoreState);
|
||||
|
||||
ARMABI_MOVI2R(R0, (u32)&coreState);
|
||||
LDR(R0, R0);
|
||||
|
@ -81,11 +81,16 @@ void AsmRoutineManager::Generate(MIPSState *mips, MIPSComp::Jit *jit)
|
||||
|
||||
dispatcherCheckCoreState = GetCodePtr();
|
||||
|
||||
// The result of slice decrementation should be in flags if somebody jumped here
|
||||
// IMPORTANT - We jump on negative, not carry!!!
|
||||
FixupBranch bailCoreState = J_CC(CC_S, true);
|
||||
|
||||
CMP(32, M((void*)&coreState), Imm32(0));
|
||||
FixupBranch badCoreState = J_CC(CC_NZ, true);
|
||||
FixupBranch skipToRealDispatch2 = J(); //skip the sync and compare first time
|
||||
|
||||
dispatcher = GetCodePtr();
|
||||
|
||||
// The result of slice decrementation should be in flags if somebody jumped here
|
||||
// IMPORTANT - We jump on negative, not carry!!!
|
||||
FixupBranch bail = J_CC(CC_S, true);
|
||||
@ -134,6 +139,7 @@ void AsmRoutineManager::Generate(MIPSState *mips, MIPSComp::Jit *jit)
|
||||
JMP(dispatcherNoCheck); // Let's just dispatch again, we'll enter the block since we know it's there.
|
||||
|
||||
SetJumpTarget(bail);
|
||||
SetJumpTarget(bailCoreState);
|
||||
|
||||
CMP(32, M((void*)&coreState), Imm32(0));
|
||||
J_CC(CC_Z, outerLoop, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user