Skip to content

Commit 3bfeb0e

Browse files
committed
arm/thumb: signal that returns can switch arch
1 parent a79e605 commit 3bfeb0e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

arch/armv7/arch_armv7.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,10 @@ class Armv7Architecture: public ArmCommonArchitecture
705705
if (UNCONDITIONAL(instr.cond))
706706
{
707707
if (instr.operands[0].cls == REG && instr.operands[0].reg == REG_LR)
708+
{
708709
result.AddBranch(FunctionReturn);
710+
result.archTransitionByTargetAddr = true;
711+
}
709712
else
710713
{
711714
result.AddBranch(UnresolvedBranch);

arch/armv7/thumb2_disasm/arch_thumb2.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ class Thumb2Architecture: public ArmCommonArchitecture
273273
((decomp.format->operands[0].type == OPERAND_FORMAT_REG) &&
274274
(decomp.fields[decomp.format->operands[0].field0] == 14))) {
275275
result.AddBranch(FunctionReturn);
276+
result.archTransitionByTargetAddr = true;
276277
} else {
277278
result.AddBranch(UnresolvedBranch);
278279
result.archTransitionByTargetAddr = true;

0 commit comments

Comments
 (0)