Merge pull request #482 from unknownbrackets/jit-idle

Check downcount in jit after a syscall
This commit is contained in:
Henrik Rydgård committed 2013-01-24 00:17:14 -08:00
commit c68cf0caaa
2 files changed
+11

No files matched your search

+5
View File
@@ -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);
+6
View File
@@ -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);