decompiler  1.0.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ghidra::TransformOp Class Reference

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

TransformVargetOut (void) const
 Get the output placeholder variable for this operator.
 
TransformVargetIn (int4 i) const
 Get the i-th input placeholder variable for this.
 

Private Member Functions

void createReplacement (Funcdata *fd)
 Create the new/modified op this placeholder represents. More...
 
bool attemptInsertion (Funcdata *fd)
 Try to put the new PcodeOp into its basic block. More...
 

Private Attributes

PcodeOpop
 Original op which this is splitting (or null)
 
PcodeOpreplacement
 The new replacement op.
 
OpCode opc
 Opcode of the new op.
 
uint4 special
 Special handling code when creating.
 
TransformVaroutput
 Varnode output.
 
vector< TransformVar * > input
 Varnode inputs.
 
TransformOpfollow
 The following op after this (if not null)
 

Friends

class TransformManager
 
class TransformVar
 

Detailed Description

Placeholder node for PcodeOp that will exist after a transform is applied to a function.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Special annotations on new pcode ops.

Enumerator
op_replacement 

Op replaces an existing op.

op_preexisting 

Op already exists (but will be transformed)

indirect_creation 

Mark op as indirect creation.

indirect_creation_possible_out 

Mark op as indirect creation and possible call output.

Member Function Documentation

◆ attemptInsertion()

bool ghidra::TransformOp::attemptInsertion ( Funcdata fd)
private

Try to put the new PcodeOp into its basic block.

Parameters
fdis the function into which the PcodeOp will be inserted
Returns
true if the op is successfully inserted or already inserted

References ghidra::CPUI_MULTIEQUAL, ghidra::Funcdata::opInsertBefore(), and ghidra::Funcdata::opInsertBegin().

◆ createReplacement()

void ghidra::TransformOp::createReplacement ( Funcdata fd)
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

Parameters
fdis the function in which to make the modifications

References ghidra::CPUI_MULTIEQUAL, ghidra::Funcdata::newOp(), op_preexisting, ghidra::Funcdata::opInsertBefore(), ghidra::Funcdata::opInsertBegin(), ghidra::Funcdata::opInsertInput(), ghidra::Funcdata::opRemoveInput(), ghidra::Funcdata::opSetOpcode(), and ghidra::Funcdata::opUnsetInput().


The documentation for this class was generated from the following files: