PPCAnalyst now detects internal branches better
For example: ``` addr opcode disasm 80026584 48000054 b ->0x800265D8 ```
This commit is contained in:
parent
36720e6822
commit
31ec57ab81
|
@ -172,12 +172,23 @@ bool AnalyzeFunction(u32 startAddr, Symbol &func, int max_size)
|
|||
else
|
||||
{
|
||||
u32 target = EvaluateBranchTarget(instr, addr);
|
||||
if (target != INVALID_TARGET && instr.LK)
|
||||
if (target != INVALID_TARGET)
|
||||
{
|
||||
if (instr.LK)
|
||||
{
|
||||
//we found a branch-n-link!
|
||||
func.calls.push_back(SCall(target,addr));
|
||||
func.calls.push_back(SCall(target, addr));
|
||||
func.flags &= ~FFLAG_LEAF;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (target > farthestInternalBranchTarget)
|
||||
{
|
||||
farthestInternalBranchTarget = target;
|
||||
}
|
||||
numInternalBranches++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue