|
decompiler 1.0.0
|
A p-code operation in a SLEIGH specification. More...
#include <semantics.hh>
Public Member Functions | |
| OpTpl (void) | |
| Construct an uninitialized OpTpl. | |
| OpTpl (OpCode oc) | |
| Construct an OpTpl with not inputs or output. | |
| ~OpTpl (void) | |
| Destructor. More... | |
| VarnodeTpl * | getOut (void) const |
| Get the output VarnodeTpl (or NULL) | |
| int4 | numInput (void) const |
| Return the number of inputs to this. | |
| VarnodeTpl * | getIn (int4 i) const |
| Get the i-th input VarnodeTpl. | |
| OpCode | getOpcode (void) const |
| Get the operation code. | |
| bool | isZeroSize (void) const |
| Return true if any input or output has zero size. | |
| void | setOpcode (OpCode o) |
| Set the operation code. | |
| void | setOutput (VarnodeTpl *vt) |
| Set the output VarnodeTpl. | |
| void | clearOutput (void) |
| Remove the existing output VarnodeTpl. | |
| void | addInput (VarnodeTpl *vt) |
| Add an input VarnodeTpl. | |
| void | setInput (VarnodeTpl *vt, int4 slot) |
| Set the VarnodeTpl for a specific input slot. | |
| void | removeInput (int4 index) |
| Remove the indicated input. More... | |
| void | changeHandleIndex (const vector< int4 > &handmap) |
| Remap any handle indices for inputs and outputs to this. More... | |
| void | encode (Encoder &encoder) const |
| Encode this OpTpl to an output stream. More... | |
| void | decode (Decoder &decoder) |
| Decode this OpTpl from a stream. More... | |
Private Attributes | |
| VarnodeTpl * | output |
| The output variable of the operation, or NULL. | |
| OpCode | opc |
| The code describing the operation. | |
| vector< VarnodeTpl * > | input |
| Inputs to the operation. | |
A p-code operation in a SLEIGH specification.
Each input and output to the operation is a VarnodeTpl.
| ghidra::OpTpl::~OpTpl | ( | void | ) |
| void ghidra::OpTpl::changeHandleIndex | ( | const vector< int4 > & | handmap | ) |
Remap any handle indices for inputs and outputs to this.
This is used to help reorder sub-constructors. Each input and output VarnodeTpl is remapped using the given array of handle indices
| handmap | is the given array of new handle indices |
References ghidra::VarnodeTpl::changeHandleIndex(), input, and output.
Referenced by ghidra::ConstructTpl::changeHandleIndex().
| void ghidra::OpTpl::decode | ( | Decoder & | decoder | ) |
Decode this OpTpl from a stream.
| decoder | is the input stream |
References ghidra::Decoder::closeElement(), ghidra::VarnodeTpl::decode(), input, opc, ghidra::Decoder::openElement(), output, ghidra::Decoder::peekElement(), and ghidra::Decoder::readOpcode().
Referenced by ghidra::ConstructTpl::decode().
| void ghidra::OpTpl::encode | ( | Encoder & | encoder | ) | const |
Encode this OpTpl to an output stream.
| encoder | is the output stream |
References ghidra::Encoder::closeElement(), ghidra::VarnodeTpl::encode(), encode(), input, opc, ghidra::Encoder::openElement(), output, and ghidra::Encoder::writeOpcode().
Referenced by encode().
| void ghidra::OpTpl::removeInput | ( | int4 | index | ) |
Remove the indicated input.
| index | is the index of the input to remove |
References input.
Referenced by ghidra::ConsistencyChecker::dealWithUnnecessaryTrunc().