hrydgard/ppsspp — pull request #468 by unknownbrackets (2013-01-22 07:34:22+00:00)
Title: Match the interpreter better in jit

This includes a few random things, sorry. I haven't nailed down the difference yet, but wanted to make sure everything else matched up so comparison was easier.

Changes:

* On x86, read the emuhack using a disp32 instead of using EDX as a temporary (same as lw.) I just did this while reading the dispatcher. If there was a good reason to use the SEB and EDX, probably deserves a comment and changing lw too.

* Makes the interpreter count skipped likely slots as a cycle. This matches jit, and my understanding is they are changed to a nop in the pipeline but still waste a cycle.

* Adds the current tick count to the Windows disasm. I know the debug count is probably meant to be there, but it was commented out anyway.

* Fixes jit breakpoints eating extra cycles when set in delay slots.

* Correctly adjusts downcount before syscalls. Otherwise, they are off by one (including Advance() reschedules.) This does add a SUB for every syscall, but it also makes timing match more exactly between interpreter and jit which I think is worth it.

* Moves Advance() to the top of the interpreter loop, instead of the bottom. Makes timing match better and can't find any negative effects.

Now my cycles match exactly until the point where jit breaks. Hurray.

-[Unknown]