From b28a9e4d24b42a59de5e333c99aec6dcc30435f0 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Wed, 4 Aug 2021 14:58:41 +0200 Subject: JIT: don't lengthen blocks on a skipped SVC SVC would need special handling because of the bank switching --- src/ARMJIT.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ARMJIT.cpp b/src/ARMJIT.cpp index 3ffb31d..fd57399 100644 --- a/src/ARMJIT.cpp +++ b/src/ARMJIT.cpp @@ -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; } -- cgit v1.2.3