Ghidra Decompiler Analysis Engine
|
Class for tracing changes of precision in floating point variables. More...
#include <subflow.hh>
Public Member Functions | |
SubfloatFlow (Funcdata *f, Varnode *root, int4 prec) | |
virtual bool | preserveAddress (Varnode *vn, int4 bitSize, int4 lsbOffset) const |
Should the address of the given Varnode be preserved when constructing a piece. More... | |
bool | doTrace (void) |
Trace logical value as far as possible. More... | |
Public Member Functions inherited from TransformManager | |
virtual | ~TransformManager (void) |
Destructor. | |
void | clearVarnodeMarks (void) |
Clear mark for all Varnodes in the map. | |
TransformVar * | newPreexistingVarnode (Varnode *vn) |
Make placeholder for preexisting Varnode. More... | |
TransformVar * | newUnique (int4 size) |
Make placeholder for new unique space Varnode. More... | |
TransformVar * | newConstant (int4 size, int4 lsbOffset, uintb val) |
Make placeholder for constant Varnode. More... | |
TransformVar * | newIop (Varnode *vn) |
Make placeholder for special iop constant. More... | |
TransformVar * | newPiece (Varnode *vn, int4 bitSize, int4 lsbOffset) |
Make placeholder for piece of a Varnode. More... | |
TransformVar * | newSplit (Varnode *vn, const LaneDescription &description) |
Create placeholder nodes splitting a Varnode into its lanes. More... | |
TransformVar * | newSplit (Varnode *vn, const LaneDescription &description, int4 numLanes, int4 startLane) |
Create placeholder nodes splitting a Varnode into a subset of lanes in the given description. More... | |
TransformOp * | newOpReplace (int4 numParams, OpCode opc, PcodeOp *replace) |
Create a new placeholder op intended to replace an existing op. More... | |
TransformOp * | newOp (int4 numParams, OpCode opc, TransformOp *follow) |
Create a new placeholder op that will not replace an existing op. More... | |
TransformOp * | newPreexistingOp (int4 numParams, OpCode opc, PcodeOp *originalOp) |
Create a new placeholder op for an existing PcodeOp. More... | |
TransformVar * | getPreexistingVarnode (Varnode *vn) |
Get (or create) placeholder for preexisting Varnode. More... | |
TransformVar * | getPiece (Varnode *vn, int4 bitSize, int4 lsbOffset) |
Get (or create) placeholder piece. More... | |
TransformVar * | getSplit (Varnode *vn, const LaneDescription &description) |
Find (or create) placeholder nodes splitting a Varnode into its lanes. More... | |
TransformVar * | getSplit (Varnode *vn, const LaneDescription &description, int4 numLanes, int4 startLane) |
Find (or create) placeholder nodes splitting a Varnode into a subset of lanes from a description. More... | |
void | opSetInput (TransformOp *rop, TransformVar *rvn, int4 slot) |
Mark given variable as input to given op. More... | |
void | opSetOutput (TransformOp *rop, TransformVar *rvn) |
Mark given variable as output of given op. More... | |
void | apply (void) |
Apply the full transform to the function. | |
Additional Inherited Members | |
Static Public Member Functions inherited from TransformManager | |
static bool | preexistingGuard (int4 slot, TransformVar *rvn) |
Should newPreexistingOp be called. More... | |
Class for tracing changes of precision in floating point variables.
It follows the flow of a logical lower precision value stored in higher precision locations and then rewrites the data-flow in terms of the lower precision, eliminating the precision conversions.
f | is the function being transformed |
root | is the start Varnode containing the logical value |
prec | is the precision to assume for the logical value |
bool SubfloatFlow::doTrace | ( | void | ) |
Trace logical value as far as possible.
The interpretation that the root Varnode contains a logical value with smaller precision is pushed through the data-flow. If the interpretation is inconsistent, false is returned. Otherwise a transform is constructed that makes the smaller precision the explicit size of Varnodes within the data-flow.
|
virtual |
Should the address of the given Varnode be preserved when constructing a piece.
A new Varnode will be created that represents a logical piece of the given Varnode. This routine determines whether the new Varnode should be constructed using storage which overlaps the given Varnode. It returns true if overlapping storage should be used, false if the new Varnode should be constructed as a unique temporary.
vn | is the given Varnode |
bitSize | is the logical size of the Varnode piece being constructed |
lsbOffset | is the least significant bit position of the logical value within the given Varnode |
Reimplemented from TransformManager.