mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
Adjusting some guard analysis
This commit is contained in:
parent
ed786460ca
commit
163fa4af57
4 changed files with 15 additions and 4 deletions
|
@ -2487,6 +2487,7 @@ int4 RuleZextEliminate::applyOp(PcodeOp *op,Funcdata &data)
|
|||
if (!vn2->isConstant()) return 0;
|
||||
zext = vn1->getDef();
|
||||
if (!zext->getIn(0)->isHeritageKnown()) return 0;
|
||||
if (vn1->loneDescend() != op) return 0; // Make sure extension is not used for anything else
|
||||
smallsize = zext->getIn(0)->getSize();
|
||||
val = vn2->getOffset();
|
||||
if ((val>>(8*smallsize))==0) { // Is zero extension unnecessary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue