mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-2563 SplitDatatype transformer
This commit is contained in:
parent
269ea1ae7a
commit
bdf1314b4f
28 changed files with 1699 additions and 161 deletions
|
@ -888,6 +888,21 @@ bool Funcdata::setUnionField(const Datatype *parent,const PcodeOp *op,int4 slot,
|
|||
}
|
||||
(*res.first).second = resolve;
|
||||
}
|
||||
if (op->code() == CPUI_MULTIEQUAL && slot >= 0) {
|
||||
// Data-type propagation doesn't happen between MULTIEQUAL input slots holding the same Varnode
|
||||
// So if this is a MULTIEQUAL, copy resolution to any other input slots holding the same Varnode
|
||||
const Varnode *vn = op->getIn(slot); // The Varnode being directly set
|
||||
for(int4 i=0;i<op->numInput();++i) {
|
||||
if (i == slot) continue;
|
||||
if (op->getIn(i) != vn) continue; // Check that different input slot holds same Varnode
|
||||
ResolveEdge dupedge(parent,op,i);
|
||||
res = unionMap.emplace(dupedge,resolve);
|
||||
if (!res.second) {
|
||||
if (!(*res.first).second.isLocked())
|
||||
(*res.first).second = resolve;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue