mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-02 02:52:30 +02: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
|
else
|
||||||
{
|
{
|
||||||
u32 target = EvaluateBranchTarget(instr, addr);
|
u32 target = EvaluateBranchTarget(instr, addr);
|
||||||
if (target != INVALID_TARGET && instr.LK)
|
if (target != INVALID_TARGET)
|
||||||
{
|
{
|
||||||
//we found a branch-n-link!
|
if (instr.LK)
|
||||||
func.calls.push_back(SCall(target,addr));
|
{
|
||||||
func.flags &= ~FFLAG_LEAF;
|
//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