hrydgard/ppsspp — pull request #944 by unknownbrackets (2013-03-11 09:22:41+00:00)
Title: Fix jit bug with jal found in Phantasy Star Portable 2

This is a tricky one. Either evil handcoded asm or a terrible compiler imho.

The jit was getting stuck here:

```
08c9f270 addiu sp, sp, -0x10
08c9f274 sw ra, 0(sp)
08c9f278 jal 08c9f1d8
08c9f27c lw ra, 0(sp)
08c9f280 jr ra
08c9f284 addiu sp, sp, 0x10
```

Note the "lw ra" in the delay slot. Yep, tricky indeed.

Includes an untested fix to ARM, but I think it's right. It compiles anyhow... Can undo the optimization (second commit) if not, I think.

-[Unknown]