hrydgard/ppsspp — pull request #6444 by unknownbrackets (2014-06-28 07:46:42+00:00)
Title: Use more correct rounding in armjit, update x86jit and minor

So, it sounds like this will fix #2278. Specifically the old method of rounding was simply not accurate enough.

This makes cvt.w.s quite complex. But, from testing a number of games it seems like 0/1 are the vastly most common rounding modes, which makes sense. Most games use the specific instructions instead. It seems like trunc.w.s is the most common, which makes sense.

Also had to take extra care of the fd == fs case, and used a jump because it seems like a jump is faster than 3+ instructions at least on armv7.

This also updates the x86jit to keep track of HI/LO/FPCOND/VFPUCC like armjit. Just for consistency really.

Not sure if we could try to use/cache the hardware rounding mode instead, or if that would even buy us anything. I assume we'd want to set it back at the end of the jit block, so it'd only help if they come in a row.

-[Unknown]