|
Ghidra 11.4.2
Ghidra internal decompiler documentation.
|
Collapse two COPYs into contiguous address forced Varnodes. More...
#include <double.hh>
Public Member Functions | |
| bool | verify (Varnode *h, Varnode *l, Varnode *w, PcodeOp *cpy) |
| Make sure the COPYs have the correct form. | |
| bool | applyRule (SplitVarnode &i, PcodeOp *cpy, bool workishi, Funcdata &data) |
Private Attributes | |
| SplitVarnode | in |
| Incoming pieces to COPY. | |
| Varnode * | reslo |
| Least significant result of global COPY. | |
| Varnode * | reshi |
| Most significant result of global COPY. | |
| PcodeOp * | copylo |
| Partial COPY of least significant piece. | |
| PcodeOp * | copyhi |
| Partial COPY of most significant piece. | |
| Address | addrOut |
| Storage address. | |
Collapse two COPYs into contiguous address forced Varnodes.
The inputs must be pieces of a logical whole and outputs must be address forced with no descendants. Take into account special form of COPYs holding global variables upto/past a RETURN.
| bool ghidra::CopyForceForm::applyRule | ( | SplitVarnode & | i, |
| PcodeOp * | cpy, | ||
| bool | workishi, | ||
| Funcdata & | data | ||
| ) |
| i | is the putative input to the COPYs |
| cpy | is a putative COPY |
| workishi | is true if the COPY is of the most significant piece |
| data | is the function |
References addrOut, copyhi, copylo, ghidra::SplitVarnode::getHi(), ghidra::SplitVarnode::getLo(), ghidra::SplitVarnode::getWhole(), ghidra::SplitVarnode::hasBothPieces(), in, ghidra::SplitVarnode::replaceCopyForce(), and verify().
Referenced by ghidra::SplitVarnode::applyRuleIn().
Make sure the COPYs have the correct form.
Starting with the input pieces, identify the matching COPYs and verify that they act as a single address forced COPY with no descendants.
| h | is the most significant input piece |
| l | is the least significant input piece |
| w | is the preexisting logical whole |
| cpy | is the COPY of the most significant piece |
References addrOut, ghidra::Varnode::beginDescend(), ghidra::PcodeOp::code(), copyhi, copylo, ghidra::CPUI_COPY, ghidra::Varnode::endDescend(), ghidra::Varnode::getAddr(), ghidra::Varnode::getDef(), ghidra::PcodeOp::getIn(), ghidra::PcodeOp::getOut(), ghidra::PcodeOp::getParent(), ghidra::Varnode::hasNoDescend(), ghidra::Varnode::isAddrForce(), ghidra::SplitVarnode::isAddrTiedContiguous(), ghidra::PcodeOp::isReturnCopy(), ghidra::Varnode::isWritten(), ghidra::Varnode::loneDescend(), reshi, and reslo.
Referenced by applyRule().