Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
Placeholder node for PcodeOp that will exist after a transform is applied to a function. More...
#include <transform.hh>
Public Types | |
enum | { op_replacement = 1 , op_preexisting = 2 , indirect_creation = 4 , indirect_creation_possible_out = 8 } |
Special annotations on new pcode ops. More... | |
Public Member Functions | |
TransformVar * | getOut (void) const |
Get the output placeholder variable for this operator. | |
TransformVar * | getIn (int4 i) const |
Get the i-th input placeholder variable for this. | |
void | inheritIndirect (PcodeOp *indOp) |
Set indirect creation flags for this based on given INDIRECT. | |
Private Member Functions | |
void | createReplacement (Funcdata *fd) |
Create the new/modified op this placeholder represents. | |
bool | attemptInsertion (Funcdata *fd) |
Try to put the new PcodeOp into its basic block. | |
Private Attributes | |
PcodeOp * | op |
Original op which this is splitting (or null) | |
PcodeOp * | replacement |
The new replacement op. | |
OpCode | opc |
Opcode of the new op. | |
uint4 | special |
Special handling code when creating. | |
TransformVar * | output |
Varnode output. | |
vector< TransformVar * > | input |
Varnode inputs. | |
TransformOp * | follow |
The following op after this (if not null) | |
Friends | |
class | TransformManager |
class | TransformVar |
Placeholder node for PcodeOp that will exist after a transform is applied to a function.
anonymous enum |
|
private |
Try to put the new PcodeOp into its basic block.
fd | is the function into which the PcodeOp will be inserted |
References ghidra::CPUI_MULTIEQUAL, follow, ghidra::PcodeOp::getParent(), opc, ghidra::Funcdata::opInsertBefore(), ghidra::Funcdata::opInsertBegin(), and replacement.
|
private |
Create the new/modified op this placeholder represents.
Create a new PcodeOp or modify an existing one so that it matches this placeholder description. Go ahead an insert the new PcodeOp into the basic block if possible
fd | is the function in which to make the modifications |
References ghidra::CPUI_MULTIEQUAL, ghidra::TransformVar::createReplacement(), follow, ghidra::PcodeOp::getAddr(), ghidra::PcodeOp::getParent(), input, ghidra::Funcdata::newOp(), ghidra::PcodeOp::numInput(), op, op_preexisting, opc, ghidra::Funcdata::opInsertBefore(), ghidra::Funcdata::opInsertBegin(), ghidra::Funcdata::opInsertInput(), ghidra::Funcdata::opRemoveInput(), ghidra::Funcdata::opSetOpcode(), ghidra::Funcdata::opUnsetInput(), output, replacement, and special.
void ghidra::TransformOp::inheritIndirect | ( | PcodeOp * | indOp | ) |
Set indirect creation flags for this based on given INDIRECT.
Prepare to build the transformed INDIRECT PcodeOp based on settings from the given INDIRECT.
indOp | is the given INDIRECT |
References ghidra::PcodeOp::getIn(), indirect_creation, indirect_creation_possible_out, ghidra::PcodeOp::isIndirectCreation(), ghidra::Varnode::isIndirectZero(), and special.
Referenced by ghidra::SplitFlow::addOp(), and ghidra::LaneDivide::buildIndirect().