dolphin-emu/dolphin — pull request #1021 by FioraAeterna (2014-09-07 09:25:39+00:00)
Title: WIP JIT: Carry optimizations!

***DON'T PUSH THIS PR PLEASE, COMEX***

This PR depends on changes made in my integer optimizations PR, so until that's pushed, this will contain those in addition to the ones to be reviewed (the last 4 commits here). Please only look at those last 4!

These commits basically:

1. Refactor the carry-affecting arithmetic ops to save ~130 lines of code and make the later patches easier.
2. Add PPCAnalyst optimization for not calculating carry flags that won't be used (especially useful for srawix).
3. Add the ability to keep carry flags in the x86 flags register between ops in the case that they're used in the next op, such as in super common idioms like subc/subfe and so on.

Seems to be ~9% faster overall in Pokemon Puzzle from a quick inaccurate benchmark.