Ghidra Decompiler Analysis Engine
|
16 #ifndef __CPUI_DOUBLE__
17 #define __CPUI_DOUBLE__
30 bool findWholeSplitToPieces(
void);
31 bool findDefinitionPoint(
void);
32 bool findWholeBuiltFromPieces(
void);
38 void initPartial(int4 sz,uintb v);
45 bool isConstant(
void)
const {
return (lo == (
Varnode *)0); }
46 bool hasBothPieces(
void)
const {
return ((hi!=(
Varnode *)0)&&(lo!=(
Varnode *)0)); }
47 int4 getSize(
void)
const {
return wholesize; }
48 Varnode *getLo(
void)
const {
return lo; }
49 Varnode *getHi(
void)
const {
return hi; }
50 Varnode *getWhole(
void)
const {
return whole; }
51 PcodeOp *getDefPoint(
void)
const {
return defpoint; }
52 BlockBasic *getDefBlock(
void)
const {
return defblock; }
53 uintb getValue(
void)
const {
return val; }
54 bool isWholeFeasible(
PcodeOp *existop);
56 void findCreateWhole(
Funcdata &data);
57 void findCreateOutputWhole(
Funcdata &data);
58 void createJoinedWhole(
Funcdata &data);
59 void buildLoFromWhole(
Funcdata &data);
60 void buildHiFromWhole(
Funcdata &data);
61 PcodeOp *findEarliestSplitPoint(
void);
63 static bool adjacentOffsets(
Varnode *vn1,
Varnode *vn2,uintb size1);
66 static void wholeList(
Varnode *w,vector<SplitVarnode> &splitvec);
67 static void findCopies(
const SplitVarnode &in,vector<SplitVarnode> &splitvec);
69 static bool otherwiseEmpty(
PcodeOp *branchop);
70 static bool verifyMultNegOne(
PcodeOp *op);
101 bool checkForCarry(
PcodeOp *op);
111 PcodeOp *zextop,*lessop,*negop,*loadd,*add2;
130 int4 findHiMatch(
void);
142 int4 hi1slot,lo1slot;
143 bool notequalformhi,notequalformlo;
154 int4 orhislot,xorhislot;
156 bool checkLoForm(
void);
181 PcodeOp *hilessbool,*lolessbool,*hieqbool;
182 PcodeOp *hiless,*hiequal,*loless;
183 Varnode *vnhil1,*vnhil2,*vnhie1,*vnhie2;
187 bool hiflip,equalflip,loflip;
188 bool lolessiszerocomp;
189 bool lolessequalform,hilessequalform,signcompare;
190 bool midlessform,midlessequal,midsigncompare;
191 bool hiconstform,midconstform,loconstform;
192 uintb hival,midval,loval;
195 bool mapOpsFromBlocks(
void);
196 bool checkSignedness(
void);
197 bool normalizeHi(
void);
198 bool normalizeMid(
void);
199 bool normalizeLo(
void);
200 bool checkBlockForm(
void);
201 bool checkOpForm(
void);
202 void setOpCode(
void);
203 bool setBoolOp(
void);
205 bool testReplace(
void);
214 bool signcompare,hilessequalform;
223 PcodeOp *loshift,*midshift,*hishift;
230 bool verifyShiftAmount(
void);
244 PcodeOp *multlo,*multhi1,*multhi2;
245 Varnode *midtmp,*lo1zext,*lo2zext;
253 bool mapResHiSmallConst(
Varnode *rhi);
254 bool findLoFromIn(
void);
255 bool findLoFromInSmallConst(
void);
257 bool findResLo(
void);
259 bool mapFromInSmallConst(
Varnode *rhi);
299 virtual void getOpList(vector<uint4> &oplist)
const;
310 virtual void getOpList(vector<uint4> &oplist)
const;
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: double.cc:2872
A region where processor data is stored.
Definition: space.hh:73
Description of a control-flow block containing PcodeOps.
Definition: block.hh:60
Class for performing a single transformation on a PcodeOp or Varnode.
Definition: action.hh:194
Definition: double.hh:303
The list of groups defining a root Action.
Definition: action.hh:29
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: double.cc:2949
A basic block for p-code operations.
Definition: block.hh:365
virtual void reset(Funcdata &data)
Reset this Rule.
Definition: double.cc:2866
Lowest level operation of the p-code language.
Definition: op.hh:58
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: double.cc:2943
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: double.cc:2878
A low-level variable or contiguous set of bytes described by an Address and a size.
Definition: varnode.hh:65
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: double.hh:294
Definition: double.hh:291
Utilities for processing data structures associated with a single function.
bool contains(const string &nm) const
Check if this ActionGroupList contains a given group.
Definition: action.hh:37
A low-level machine address for labelling bytes and data.
Definition: address.hh:46
Container for data structures associated with a single function.
Definition: funcdata.hh:45
OpCode
The op-code defining a specific p-code operation (PcodeOp)
Definition: opcodes.hh:35
Rule(const string &g, uint4 fl, const string &nm)
Construct given group, properties name.
Definition: action.cc:620
This is the basic set of transformation Rule objects.
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: double.hh:306
Definition: double.hh:174