Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
Simply a double precision operation, pushing down one level, starting from a marked double precision input. More...
#include <double.hh>
Public Member Functions | |
RuleDoubleIn (const string &g) | |
Constructor. | |
virtual Rule * | clone (const ActionGroupList &grouplist) const |
Clone the Rule. | |
virtual void | reset (Funcdata &data) |
Reset this Rule. | |
virtual void | getOpList (vector< uint4 > &oplist) const |
List of op codes this rule operates on. | |
virtual int4 | applyOp (PcodeOp *op, Funcdata &data) |
Attempt to apply this Rule. | |
![]() | |
Rule (const string &g, uint4 fl, const string &nm) | |
Construct given group, properties name. | |
virtual | ~Rule (void) |
Destructor. | |
const string & | getName (void) const |
Return the name of this Rule. | |
const string & | getGroup (void) const |
Return the group this Rule belongs to. | |
uint4 | getNumTests (void) |
Get number of attempted applications. | |
uint4 | getNumApply (void) |
Get number of successful applications. | |
void | setBreak (uint4 tp) |
Set a breakpoint on this Rule. | |
void | clearBreak (uint4 tp) |
Clear a breakpoint on this Rule. | |
void | clearBreakPoints (void) |
Clear all breakpoints on this Rule. | |
void | turnOnWarnings (void) |
Enable warnings for this Rule. | |
void | turnOffWarnings (void) |
Disable warnings for this Rule. | |
bool | isDisabled (void) const |
Return true if this Rule is disabled. | |
void | setDisable (void) |
Disable this Rule (within its pool) | |
void | clearDisable (void) |
Enable this Rule (within its pool) | |
bool | checkActionBreak (void) |
Check if an action breakpoint is turned on. | |
uint4 | getBreakPoint (void) const |
Return breakpoint toggles. | |
virtual void | resetStats (void) |
Reset Rule statistics. | |
virtual void | printStatistics (ostream &s) const |
Print statistics for this Rule. | |
Private Member Functions | |
int4 | attemptMarking (Varnode *vn, PcodeOp *subpieceOp) |
Determine if the given Varnode from a SUBPIECE should be marked as a double precision piece. | |
Additional Inherited Members | |
![]() | |
enum | typeflags { type_disable = 1 , rule_debug = 2 , warnings_on = 4 , warnings_given = 8 } |
Properties associated with a Rule. More... | |
Simply a double precision operation, pushing down one level, starting from a marked double precision input.
This rule starts by trying to find a pair of Varnodes that are SUBPIECE from a whole, are marked as double precision, and that are then used in some double precision operation. The various operation forms are overlayed on the data-flow until a matching one is found. The pieces of the double precision operation are then transformed into a single logical operation on the whole.
Attempt to apply this Rule.
This method contains the main logic for applying the Rule. It must use a given PcodeOp as the point at which the Rule applies. If it does apply, changes are made directly to the function and 1 (non-zero) is returned, otherwise 0 is returned.
Reimplemented from ghidra::Rule.
References ghidra::SplitVarnode::applyRuleIn(), attemptMarking(), ghidra::PcodeOp::getIn(), ghidra::PcodeOp::getOut(), ghidra::Funcdata::hasUnreachableBlocks(), ghidra::Varnode::isPrecisHi(), ghidra::Varnode::isPrecisLo(), and ghidra::SplitVarnode::wholeList().
Determine if the given Varnode from a SUBPIECE should be marked as a double precision piece.
If the given Varnode looks like the most significant piece, there is another SUBPIECE that looks like the least significant piece, and the whole is from an operation that produces a logical whole, then mark the Varnode (and its companion) as double precision pieces and return 1.
References ghidra::Varnode::beginDescend(), ghidra::PcodeOp::code(), ghidra::CPUI_SUBPIECE, ghidra::Varnode::endDescend(), ghidra::Varnode::getDef(), ghidra::PcodeOp::getIn(), ghidra::Varnode::getOffset(), ghidra::PcodeOp::getOpcode(), ghidra::PcodeOp::getOut(), ghidra::Varnode::getSize(), ghidra::Varnode::getType(), ghidra::TypeOp::isArithmeticOp(), ghidra::TypeOp::isFloatingPointOp(), ghidra::Varnode::isInput(), ghidra::Datatype::isPrimitiveWhole(), ghidra::Varnode::isTypeLock(), ghidra::Varnode::isWritten(), ghidra::Varnode::setPrecisHi(), and ghidra::Varnode::setPrecisLo().
Referenced by applyOp().
|
inlinevirtual |
Clone the Rule.
If this Rule is a member of one of the groups in the grouplist, this returns a clone of the Rule, otherwise NULL is returned.
grouplist | is the list of groups being cloned |
Implements ghidra::Rule.
References ghidra::ActionGroupList::contains(), and ghidra::Rule::getGroup().
|
virtual |
List of op codes this rule operates on.
Populate the given array with all possible OpCodes this Rule might apply to. By default, this method returns all possible OpCodes
oplist | is the array to populate |
Reimplemented from ghidra::Rule.
References ghidra::CPUI_SUBPIECE.
|
virtual |
Reset this Rule.
Any state that is specific to a particular function is cleared by this method. This method can be used to initialize a Rule based on a new function it will apply to
data | is the new function about to be transformed |
Reimplemented from ghidra::Rule.
References ghidra::Funcdata::setDoublePrecisRecovery().