mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Treat STORE based INDIRECT as artificial
This commit is contained in:
parent
a4856b9af0
commit
feb2e6887b
1 changed files with 9 additions and 2 deletions
|
@ -487,8 +487,9 @@ void Heritage::findAddressForces(vector<PcodeOp *> ©Sinks,vector<PcodeOp *>
|
|||
if (newOp->isMark()) continue; // Already visited this op
|
||||
newOp->setMark();
|
||||
OpCode opc = newOp->code();
|
||||
bool isArtificial = (opc == CPUI_COPY || opc == CPUI_MULTIEQUAL);
|
||||
if (isArtificial) {
|
||||
bool isArtificial = false;
|
||||
if (opc == CPUI_COPY || opc == CPUI_MULTIEQUAL) {
|
||||
isArtificial = true;
|
||||
int4 maxInNew = newOp->numInput();
|
||||
for(int4 j=0;j<maxInNew;++j) {
|
||||
Varnode *inVn = newOp->getIn(j);
|
||||
|
@ -498,6 +499,12 @@ void Heritage::findAddressForces(vector<PcodeOp *> ©Sinks,vector<PcodeOp *>
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (opc == CPUI_INDIRECT && newOp->isIndirectStore()) {
|
||||
// An INDIRECT can be considered artificial if it is caused by a STORE
|
||||
Varnode *inVn = newOp->getIn(0);
|
||||
if (addr == inVn->getAddr())
|
||||
isArtificial = true;
|
||||
}
|
||||
if (isArtificial)
|
||||
copySinks.push_back(newOp);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue