Fix a bug in the ARMEmitter.
When creating a Fixupbranch we were swapping the BL and B targets. I think this was found by PPSSPP a while ago, but they never send PRs to merge their changes upstream.
This commit is contained in:
parent
b388123280
commit
93c871522f
|
@ -401,7 +401,7 @@ void ARMXEmitter::SetJumpTarget(FixupBranch const &branch)
|
|||
_dbg_assert_msg_(DYNA_REC, distance > -0x2000000 && distance <= 0x2000000,
|
||||
"SetJumpTarget out of range (%p calls %p)", code, branch.ptr);
|
||||
u32 instr = (u32)(branch.condition | ((distance >> 2) & 0x00FFFFFF));
|
||||
instr |= branch.type ? /* B */ 0x0A000000 : /* BL */ 0x0B000000;
|
||||
instr |= (0 == branch.type) ? /* B */ 0x0A000000 : /* BL */ 0x0B000000;
|
||||
*(u32*)branch.ptr = instr;
|
||||
}
|
||||
void ARMXEmitter::B(const void *fnptr)
|
||||
|
|
Loading…
Reference in New Issue