JIT: don't lengthen blocks on a skipped SVC

SVC would need special handling because of the bank switching
This commit is contained in:
RSDuck 2021-08-04 14:58:41 +02:00
parent f900792dc0
commit b28a9e4d24
1 changed files with 3 additions and 1 deletions

View File

@ -779,7 +779,8 @@ void CompileBlock(ARM* cpu)
JIT_DEBUGPRINT("merged BL\n");
}
if (instrs[i].Info.Branches() && Config::JIT_BranchOptimisations)
if (instrs[i].Info.Branches() && Config::JIT_BranchOptimisations
&& instrs[i].Info.Kind != (thumb ? ARMInstrInfo::tk_SVC : ARMInstrInfo::ak_SVC))
{
bool hasBranched = cpu->R[15] != r15;
@ -845,6 +846,7 @@ void CompileBlock(ARM* cpu)
if (!hasBranched && cond < 0xE && i + 1 < Config::JIT_MaxBlockSize)
{
JIT_DEBUGPRINT("block lengthened by untaken branch\n");
instrs[i].Info.EndBlock = false;
instrs[i].BranchFlags |= branch_FollowCondNotTaken;
}