hrydgard/ppsspp — pull request #506 by unknownbrackets (2013-01-26 16:52:11+00:00)
Title: Jit memory access cleanup

Well, this does two things.

One is properly supporting "ignore invalid memory access" being off in jit (minor performance penalty, only when option is disabled.)

The other is, I decided it was time to refactor. Turned out more complicated and automagical than I was initially planning, though. Hmm. It significantly simplifies safe memory implementation, though.

A read now looks like this:
```
JitSafeMem safe(this, rs, offset);
OpArg src;
if (safe.PrepareRead(src, safeFunc))
(this->*mov)(32, bits, gpr.RX(rt), src);
if (safe.PrepareSlowRead(safeFunc))
(this->*mov)(32, bits, gpr.RX(rt), R(EAX));
safe.WriteFinish();
```

But it emits all sorts of code for you so it's far less to the metal than before (even transparently handling direct immediate address access.) I'll still need to adjust it for VFPU, but it shouldn't be too bad.

Is there a cleaner way? Also, should I instead move it outside Jit into a separate file? Wasn't sure... it's very coupled.

-[Unknown]