Ghidra Decompiler Analysis Engine
|
Go to the documentation of this file.
53 void createReplacement(
Funcdata *fd);
54 void initialize(uint4 tp,
Varnode *v,int4 bits,int4 bytes,uintb value);
56 Varnode *getOriginal(
void)
const {
return vn; }
78 vector<TransformVar *> input;
80 void createReplacement(
Funcdata *fd);
99 LanedIterator &operator++(
void) { size += 1; normalize();
return *
this; }
100 int4 operator*(
void)
const {
return size; }
102 bool operator==(
const LanedIterator &op2)
const {
return (size == op2.size); }
103 bool operator!=(
const LanedIterator &op2)
const {
return (size != op2.size); }
111 LanedRegister(int4 sz,uint4 mask) { wholeSize = sz; sizeBitMask = mask; }
113 int4 getWholeSize(
void)
const {
return wholeSize; }
114 uint4 getSizeBitMask(
void)
const {
return sizeBitMask; }
115 void addLaneSize(int4 size) { sizeBitMask |= ((uint4)1 << size); }
116 bool allowedLane(int4 size)
const {
return (((sizeBitMask >> size) & 1) != 0); }
128 vector<int4> laneSize;
129 vector<int4> lanePosition;
134 bool subset(int4 lsbOffset,int4 size);
135 int4 getNumLanes(
void)
const {
return laneSize.size(); }
136 int4 getWholeSize(
void)
const {
return wholeSize; }
137 int4 getSize(int4 i)
const {
return laneSize[i]; }
138 int4 getPosition(int4 i)
const {
return lanePosition[i]; }
140 bool restriction(int4 numLanes,int4 skipLanes,int4 bytePos,int4 size,int4 &resNumLanes,int4 &resSkipLanes)
const;
141 bool extension(int4 numLanes,int4 skipLanes,int4 bytePos,int4 size,int4 &resNumLanes,int4 &resSkipLanes)
const;
152 map<int4,TransformVar *> pieceMap;
153 list<TransformVar> newVarnodes;
154 list<TransformOp> newOps;
157 void createOps(
void);
158 void createVarnodes(vector<TransformVar *> &inputList);
159 void removeOld(
void);
160 void transformInputVarnodes(vector<TransformVar *> &inputList);
161 void placeInputs(
void);
166 Funcdata *getFunction(
void)
const {
return fd; }
197 inline void TransformVar::initialize(uint4 tp,
Varnode *v,int4 bits,int4 bytes,uintb value)
216 rop->input[slot] = rvn;
243 if (slot == 0)
return true;
Class for iterating over possible lane sizes.
Definition: transform.hh:92
bool extension(int4 numLanes, int4 skipLanes, int4 bytePos, int4 size, int4 &resNumLanes, int4 &resSkipLanes) const
Decide if a given subset of lanes can be extended naturally for this description.
Definition: transform.cc:154
Description of logical lanes within a big Varnode.
Definition: transform.hh:126
LaneDescription(const LaneDescription &op2)
Copy constructor.
Definition: transform.cc:20
bool subset(int4 lsbOffset, int4 size)
Trim this to a subset of the original lanes.
Definition: transform.cc:68
LanedIterator const_iterator
Iterator over possible lane sizes for this register.
Definition: transform.hh:105
int4 getBoundary(int4 bytePos) const
Get index of lane that starts at the given byte position.
Definition: transform.cc:96
An XML element. A node in the DOM tree.
Definition: xml.hh:150
Lowest level operation of the p-code language.
Definition: op.hh:58
A low-level variable or contiguous set of bytes described by an Address and a size.
Definition: varnode.hh:65
Describes a (register) storage location and the ways it might be split into lanes.
Definition: transform.hh:88
bool restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore object from XML stream.
Definition: transform.cc:284
bool restriction(int4 numLanes, int4 skipLanes, int4 bytePos, int4 size, int4 &resNumLanes, int4 &resSkipLanes) const
Decide if a given truncation is natural for this description.
Definition: transform.cc:129
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
A manager for different address spaces.
Definition: translate.hh:218
The Varnode and VarnodeBank classes.