Fix Idle Skipping in JitIL. #1073

Merged
merged 1 commit into from Sep 13, 2014

Projects

None yet

5 participants

@phire
Member
phire commented Sep 13, 2014

Has been broken since the flags-opt merge. The idle skipping code in
JitIL was very brittle and depended on the IL of it's inputs not
changing in any way.

flags-opt changed the IR generated by the cmp instruction, which is part
of the idle loop, causing JitIL to break in really weird ways, which
were almost impossible to track down.

This Fixes various wii games crashing/not booting and the Regspill
error on (all?) gamecube mmu games.

@JMC47 Could you do some testing on this?

@BhaaLseN BhaaLseN and 1 other commented on an outdated diff Sep 13, 2014
...ce/Core/Core/PowerPC/JitILCommon/JitILBase_Branch.cpp
@@ -138,14 +138,18 @@ void JitILBase::bcx(UGeckoInstruction inst)
else
destination = js.compilerPC + SignExt16(inst.BD << 2);
+ // Idle skipping:
+ // The main Idle skipping is done in the LoadStore code, but there is an optimistaion here.
@BhaaLseN
BhaaLseN Sep 13, 2014 Contributor

Typo: optimization (or optimisation?)

@JMC47
JMC47 Sep 13, 2014 Contributor

Optimization says my American schooling and dictionaries.

@JMC47
Contributor
JMC47 commented Sep 13, 2014

I booted all my Wii games on it, they work just fine.

I checked the MMU games. They barely work just like before the flagsopt. So yeah, this basically saves JITIL completely.

@delroth
Member
delroth commented Sep 13, 2014

@phire: This comment grants you the permission to merge this pull request whenever you think it is ready. After addressing the remaining comments, click this link to merge.


Fix the typo, and feel free to merge.

@dolphin-emu-bot allowmerge

@phire phire Fix Idle Skipping in JitIL.
Has been broken since the flags-opt merge. The idle skipping code in
JitIL was very brittle and depended on the IL of it's inputs not
changing in any way.

flags-opt changed the IR generated by the cmp instruction, which is part
of the idle loop, causing JitIL to break in really weird ways, which
were almost impossible to track down.

This fixes various wii games crashing/not booting and the Regspill
error on (all?) gamecube mmu games.
cf869fc
@dolphin-emu-bot dolphin-emu-bot merged commit d72f61d into dolphin-emu:master Sep 13, 2014

1 check passed

default Build succeeded on the Buildbot.
Details
@phire phire deleted the phire:save_jitil2 branch Sep 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment