mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Adjust likelytrash action to account for STORE based INDIRECTs
This commit is contained in:
parent
feb2e6887b
commit
29f207400d
1 changed files with 13 additions and 1 deletions
|
@ -1716,7 +1716,13 @@ uint4 ActionLikelyTrash::countMarks(PcodeOp *op)
|
||||||
res += 1;
|
res += 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!vn->isWritten()||(vn->getDef()->code()!=CPUI_INDIRECT)) // Chain up through INDIRECTs
|
if (!vn->isWritten()) break;
|
||||||
|
PcodeOp *defOp = vn->getDef();
|
||||||
|
if (defOp == op) { // We have looped all the way around
|
||||||
|
res += 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (defOp->code() != CPUI_INDIRECT) // Chain up through INDIRECTs
|
||||||
break;
|
break;
|
||||||
vn = vn->getDef()->getIn(0);
|
vn = vn->getDef()->getIn(0);
|
||||||
}
|
}
|
||||||
|
@ -1763,6 +1769,12 @@ bool ActionLikelyTrash::traceTrash(Varnode *vn,vector<PcodeOp *> &indlist)
|
||||||
case CPUI_INDIRECT:
|
case CPUI_INDIRECT:
|
||||||
if (outvn->isPersist())
|
if (outvn->isPersist())
|
||||||
istrash = false;
|
istrash = false;
|
||||||
|
else if (op->isIndirectStore()) {
|
||||||
|
if (!outvn->isMark()) {
|
||||||
|
outvn->setMark();
|
||||||
|
markedlist.push_back(outvn);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
indlist.push_back(op);
|
indlist.push_back(op);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue