19 #ifndef __CPUI_USEROP__ 20 #define __CPUI_USEROP__ 43 name = nm; useropindex = ind; glb = g; }
101 static string appendSize(
const string &base,int4 size);
147 virtual int4 getNumVariableTerms(
void)
const=0;
155 virtual bool unify(
Funcdata &data,
PcodeOp *op,vector<Varnode *> &bindlist)
const=0;
161 virtual uintb execute(
const vector<uintb> &input)
const=0;
204 bool supportsfarpointer;
214 virtual bool unify(
Funcdata &data,
PcodeOp *op,vector<Varnode *> &bindlist)
const;
215 virtual uintb execute(
const vector<uintb> &input)
const;
251 vector<UserPcodeOp *> useroplist;
252 map<string,UserPcodeOp *> useropmap;
253 vector<SegmentOp *> segmentop;
269 return useroplist[i];
278 if (i>=segmentop.size())
return (
SegmentOp *)0;
288 void manualCallOtherFixup(
const string &useropname,
const string &outname,
289 const vector<string> &inname,
const string &snippet,
Architecture *glb);
A region where processor data is stored.
Definition: space.hh:73
An operation that reads from volatile memory.
Definition: userop.hh:112
int4 numSegmentOps(void) const
Number of segment operations supported.
Definition: userop.hh:262
OpCode
The op-code defining a specific p-code operation (PcodeOp)
Definition: opcodes.hh:35
virtual string getOperatorName(const PcodeOp *op) const
Get the symbol representing this operation in decompiled code.
Definition: userop.hh:54
The segmented address operator.
Definition: userop.hh:199
A user defined p-code op that has a dynamically defined procedure.
Definition: userop.hh:144
UserPcodeOp * getOp(int4 i) const
Definition: userop.hh:267
Container for data structures associated with a single function.
Definition: funcdata.hh:45
virtual void restoreXml(const Element *el)
Restore the detailed description from an XML stream.
Definition: userop.hh:74
SegmentOp * getSegmentOp(int4 i) const
Definition: userop.hh:277
const VarnodeData & getResolve(void) const
Get the default register for resolving indirect segments.
Definition: userop.hh:212
VolatileWriteOp * getVolatileWrite(void) const
Get (the) volatile write description.
Definition: userop.hh:283
OpFollow(void)
Construct an empty object.
Definition: userop.hh:173
A user defined operation that is injected with other p-code.
Definition: userop.hh:83
int4 getBaseSize(void) const
Get size in bytes of the base/segment value.
Definition: userop.hh:210
A simple node used to dynamically define a sequence of operations.
Definition: userop.hh:169
VolatileReadOp(Architecture *g, const string &nm, int4 ind)
Constructor.
Definition: userop.hh:114
bool hasFarPointerSupport(void) const
Return true, if this op supports far pointers.
Definition: userop.hh:209
uint4 getInjectId(void) const
Get the id of the injection object.
Definition: userop.hh:88
string name
Low-level name of p-code operator.
Definition: userop.hh:38
int4 getInnerSize(void) const
Get size in bytes of the near value.
Definition: userop.hh:211
VolatileReadOp * getVolatileRead(void) const
Get (the) volatile read description.
Definition: userop.hh:282
Lowest level operation of the p-code language.
Definition: op.hh:58
int4 getIndex2Case(void) const
Get the injection id for index2case.
Definition: userop.hh:236
VolatileOp(Architecture *g, const string &nm, int4 ind)
Constructor.
Definition: userop.hh:103
A user defined p-code op for assisting the recovery of jump tables.
Definition: userop.hh:229
AddrSpace * getSpace(void) const
Get the address space being pointed to.
Definition: userop.hh:208
UnspecializedPcodeOp(Architecture *g, const string &nm, int4 ind)
Constructor.
Definition: userop.hh:72
InjectedUserOp(Architecture *g, const string &nm, int4 ind, int4 injid)
Constructor.
Definition: userop.hh:86
Manager for all the major decompiler subsystems.
Definition: architecture.hh:117
Manager/container for description objects (UserPcodeOp) of user defined p-code ops.
Definition: userop.hh:250
int4 getIndex2Addr(void) const
Get the injection id for index2addr.
Definition: userop.hh:237
OpCode opc
The particular p-code operation.
Definition: userop.hh:170
int4 getIndex(void) const
Get the constant id of the op.
Definition: userop.hh:45
An XML element. A node in the DOM tree.
Definition: xml.hh:150
const string & getName(void) const
Get the low-level name of the p-code op.
Definition: userop.hh:44
Data-type and behavior information associated with specific p-code op-codes.
int4 getDefaultAddr(void) const
Get the injection id for defaultaddr.
Definition: userop.hh:238
int4 useropindex
Index passed in the CALLOTHER op.
Definition: userop.hh:39
A user defined p-code op with no specialization.
Definition: userop.hh:70
virtual void restoreXml(const Element *el)=0
Restore the detailed description from an XML stream.
The base class for a detailed definition of a user-defined p-code operation.
Definition: userop.hh:36
VolatileWriteOp(Architecture *g, const string &nm, int4 ind)
Constructor.
Definition: userop.hh:128
A base class for operations that access volatile memory.
Definition: userop.hh:99
virtual int4 getNumVariableTerms(void) const
Get the number of input Varnodes expected.
Definition: userop.hh:213
int4 slot
Slot to follow.
Definition: userop.hh:172
virtual ~UserPcodeOp(void)
Destructor.
Definition: userop.hh:46
uintb val
A possible constant second input.
Definition: userop.hh:171
UserPcodeOp(Architecture *g, const string &nm, int4 ind)
Construct from name and index.
Definition: userop.hh:42
Architecture * glb
Architecture owning the user defined op.
Definition: userop.hh:40
An operation that writes to volatile memory.
Definition: userop.hh:126
int4 getCalcSize(void) const
Get the injection id for calcsize.
Definition: userop.hh:239
Data defining a specific memory location.
Definition: pcoderaw.hh:33
TermPatternOp(Architecture *g, const string &nm, int4 ind)
Constructor.
Definition: userop.hh:146