mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Expanded RulePushPtr and RuleExtensionPush
This commit is contained in:
parent
9c952ed154
commit
c9ba3640bf
5 changed files with 377 additions and 91 deletions
|
@ -1027,7 +1027,6 @@ public:
|
|||
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
|
||||
};
|
||||
class RulePtrArith : public Rule {
|
||||
static bool verifyAddTreeBottom(PcodeOp *op,int4 slot);
|
||||
static bool verifyPreferredPointer(PcodeOp *op,int4 slot);
|
||||
public:
|
||||
RulePtrArith(const string &g) : Rule(g, 0, "ptrarith") {} ///< Constructor
|
||||
|
@ -1037,6 +1036,7 @@ public:
|
|||
}
|
||||
virtual void getOpList(vector<uint4> &oplist) const;
|
||||
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
|
||||
static int4 evaluatePointerExpression(PcodeOp *op,int4 slot);
|
||||
};
|
||||
class RuleStructOffset0 : public Rule {
|
||||
public:
|
||||
|
@ -1049,6 +1049,8 @@ public:
|
|||
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
|
||||
};
|
||||
class RulePushPtr : public Rule {
|
||||
static Varnode *buildVarnodeOut(Varnode *vn,PcodeOp *op,Funcdata &data);
|
||||
static void collectDuplicateNeeds(vector<PcodeOp *> &reslist,Varnode *vn);
|
||||
public:
|
||||
RulePushPtr(const string &g) : Rule(g, 0, "pushptr") {} ///< Constructor
|
||||
virtual Rule *clone(const ActionGroupList &grouplist) const {
|
||||
|
@ -1057,6 +1059,7 @@ public:
|
|||
}
|
||||
virtual void getOpList(vector<uint4> &oplist) const;
|
||||
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
|
||||
static void duplicateNeed(PcodeOp *op,Funcdata &data);
|
||||
};
|
||||
class RulePtraddUndo : public Rule {
|
||||
public:
|
||||
|
@ -1136,6 +1139,17 @@ public:
|
|||
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
|
||||
};
|
||||
|
||||
class RuleExtensionPush : public Rule {
|
||||
public:
|
||||
RuleExtensionPush(const string &g) : Rule( g, 0, "extensionpush") {} ///< Constructor
|
||||
virtual Rule *clone(const ActionGroupList &grouplist) const {
|
||||
if (!grouplist.contains(getGroup())) return (Rule *)0;
|
||||
return new RuleExtensionPush(getGroup());
|
||||
}
|
||||
virtual void getOpList(vector<uint4> &oplist) const;
|
||||
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
|
||||
};
|
||||
|
||||
class RuleSubNormal : public Rule {
|
||||
public:
|
||||
RuleSubNormal(const string &g) : Rule( g, 0, "subnormal") {} ///< Constructor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue