mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-22 05:40:15 -06:00
JIT: don't lengthen blocks on a skipped SVC
SVC would need special handling because of the bank switching
This commit is contained in:
@ -779,7 +779,8 @@ void CompileBlock(ARM* cpu)
|
|||||||
JIT_DEBUGPRINT("merged BL\n");
|
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;
|
bool hasBranched = cpu->R[15] != r15;
|
||||||
|
|
||||||
@ -845,6 +846,7 @@ void CompileBlock(ARM* cpu)
|
|||||||
|
|
||||||
if (!hasBranched && cond < 0xE && i + 1 < Config::JIT_MaxBlockSize)
|
if (!hasBranched && cond < 0xE && i + 1 < Config::JIT_MaxBlockSize)
|
||||||
{
|
{
|
||||||
|
JIT_DEBUGPRINT("block lengthened by untaken branch\n");
|
||||||
instrs[i].Info.EndBlock = false;
|
instrs[i].Info.EndBlock = false;
|
||||||
instrs[i].BranchFlags |= branch_FollowCondNotTaken;
|
instrs[i].BranchFlags |= branch_FollowCondNotTaken;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user