mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Merge pull request #371 from quarnster/patch-1
PPCAnalyst now detects internal branches better
This commit is contained in:
commit
db08f7bf4a
@ -172,11 +172,22 @@ 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)
|
||||
{
|
||||
//we found a branch-n-link!
|
||||
func.calls.push_back(SCall(target,addr));
|
||||
func.flags &= ~FFLAG_LEAF;
|
||||
if (instr.LK)
|
||||
{
|
||||
//we found a branch-n-link!
|
||||
func.calls.push_back(SCall(target, addr));
|
||||
func.flags &= ~FFLAG_LEAF;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (target > farthestInternalBranchTarget)
|
||||
{
|
||||
farthestInternalBranchTarget = target;
|
||||
}
|
||||
numInternalBranches++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user