Skip to content

Commit

Permalink
Merge pull request #2107 from Sonicadvance1/aarch64_fix_lha
Browse files Browse the repository at this point in the history
[AArch64] Fix fastmem lha/lhax.
  • Loading branch information
Sonicadvance1 committed Feb 23, 2015
2 parents d4733b5 + 859eeb6 commit 7a61bd5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Source/Core/Core/PowerPC/JitArm64/JitArm64_BackPatch.cpp
Expand Up @@ -101,10 +101,16 @@ bool JitArm64::DisasmLoadStore(const u8* ptr, u32* flags, ARM64Reg* reg)
{
*flags |= BackPatchInfo::FLAG_LOAD;
*reg = (ARM64Reg)(inst & 0x1F);
if ((next_inst & 0x7FFFF000) != 0x5AC00000) // REV
if ((next_inst & 0x7FFFF000) == 0x5AC00000) // REV
{
u32 sxth_inst = *(u32*)(ptr + 8);
if ((sxth_inst & 0x7F800000) == 0x13000000) // SXTH
*flags |= BackPatchInfo::FLAG_EXTEND;
}
else
{
*flags |= BackPatchInfo::FLAG_REVERSE;
if ((next_inst & 0x7F800000) == 0x13000000) // SXTH
*flags |= BackPatchInfo::FLAG_EXTEND;
}
return true;
}
else if (op == 0xE4) // Store
Expand Down

0 comments on commit 7a61bd5

Please sign in to comment.