aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRSDuck <RSDuck@users.noreply.github.com>2019-07-15 19:17:10 +0200
committerRSDuck <rsduck@users.noreply.github.com>2020-04-26 13:03:07 +0200
commit8ddc4d5904bafa72a6822bb2f487c9d7f100eb16 (patch)
tree386fb38d3317b36e40a119610a95d8f3b2a741e3 /src
parent411fb57c07c732a2b60e3566ae045f8f60eea29d (diff)
jit: fix BLX_reg with rn=lr
Diffstat (limited to 'src')
-rw-r--r--src/ARMJIT_x64/ARMJIT_Branch.cpp3
-rw-r--r--src/ARM_InstrInfo.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/ARMJIT_x64/ARMJIT_Branch.cpp b/src/ARMJIT_x64/ARMJIT_Branch.cpp
index 05c8ec6..1f95a90 100644
--- a/src/ARMJIT_x64/ARMJIT_Branch.cpp
+++ b/src/ARMJIT_x64/ARMJIT_Branch.cpp
@@ -187,9 +187,10 @@ void Compiler::A_Comp_BranchImm()
void Compiler::A_Comp_BranchXchangeReg()
{
OpArg rn = MapReg(CurInstr.A_Reg(0));
+ MOV(32, R(RSCRATCH), rn);
if ((CurInstr.Instr & 0xF0) == 0x30) // BLX_reg
MOV(32, MapReg(14), Imm32(R15 - 4));
- Comp_JumpTo(rn.GetSimpleReg());
+ Comp_JumpTo(RSCRATCH);
}
void Compiler::T_Comp_BCOND()
diff --git a/src/ARM_InstrInfo.cpp b/src/ARM_InstrInfo.cpp
index b8dff00..c36d6c1 100644
--- a/src/ARM_InstrInfo.cpp
+++ b/src/ARM_InstrInfo.cpp
@@ -359,10 +359,7 @@ Info Decode(bool thumb, u32 num, u32 instr)
}
if (data & A_Link)
- {
res.DstRegs |= 1 << 14;
- res.SrcRegs |= 1 << 15;
- }
if (res.Kind == ak_LDM)
res.DstRegs |= instr & (1 << 15); // this is right