diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-04-04 11:45:56 -0500 |
|---|---|---|
| committer | Sean <seanmaas27@gmail.com> | 2014-04-06 10:28:41 -0400 |
| commit | 93c871522f4dbbec54beaeeb4940b1caa8c87e5b (patch) | |
| tree | 5309ea7e61f94e0a697ce183f7e5ea6885f68c30 /Source | |
| parent | b388123280318daab44fe9c3b7b3e9bd6310302d (diff) | |
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.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Common/ArmEmitter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/ArmEmitter.cpp b/Source/Core/Common/ArmEmitter.cpp index ded0944e57..ccd05d4c45 100644 --- a/Source/Core/Common/ArmEmitter.cpp +++ b/Source/Core/Common/ArmEmitter.cpp @@ -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) |
