Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
Associate data-type and behavior information with a specific p-code op-code. More...
#include <typeop.hh>
Public Types | |
enum | { inherits_sign = 1 , inherits_sign_zero = 2 , shift_op = 4 , arithmetic_op = 8 , logical_op = 0x10 , floatingpoint_op = 0x20 } |
Public Member Functions | |
TypeOp (TypeFactory *t, OpCode opc, const string &n) | |
Constructor. | |
virtual | ~TypeOp (void) |
Destructor. | |
const string & | getName (void) const |
Get the display name of the op-code. | |
OpCode | getOpcode (void) const |
Get the op-code value. | |
uint4 | getFlags (void) const |
Get the properties associated with the op-code. | |
OpBehavior * | getBehavior (void) const |
Get the behavior associated with the op-code. | |
uintb | evaluateUnary (int4 sizeout, int4 sizein, uintb in1) const |
Emulate the unary op-code on an input value. | |
uintb | evaluateBinary (int4 sizeout, int4 sizein, uintb in1, uintb in2) const |
Emulate the binary op-code on an input value. | |
uintb | recoverInputBinary (int4 slot, int4 sizeout, uintb out, int4 sizein, uintb in) const |
Reverse the binary op-code operation, recovering a constant input value. | |
uintb | recoverInputUnary (int4 sizeout, uintb out, int4 sizein) const |
Reverse the unary op-code operation, recovering a constant input value. | |
bool | isCommutative (void) const |
Return true if this op-code is commutative. | |
bool | inheritsSign (void) const |
Return true if the op-code inherits its signedness from its inputs. | |
bool | inheritsSignFirstParamOnly (void) const |
Return true if the op-code inherits its signedness from only its first input. | |
bool | isShiftOp (void) const |
Return true if the op-code is a shift (INT_LEFT, INT_RIGHT, or INT_SRIGHT) | |
bool | isArithmeticOp (void) const |
Return true if the opcode is INT_ADD, INT_MULT, INT_DIV, INT_REM, or other arithmetic op. | |
bool | isLogicalOp (void) const |
Return true if the opcode is INT_AND, INT_OR, INT_XOR, or other logical op. | |
bool | isFloatingPointOp (void) const |
Return true if the opcode is FLOAT_ADD, FLOAT_MULT, or other floating-point operation. | |
virtual Datatype * | getOutputLocal (const PcodeOp *op) const |
Find the minimal (or suggested) data-type of an output to this op-code. | |
virtual Datatype * | getInputLocal (const PcodeOp *op, int4 slot) const |
Find the minimal (or suggested) data-type of an input to this op-code. | |
virtual Datatype * | getOutputToken (const PcodeOp *op, CastStrategy *castStrategy) const |
Find the data-type of the output that would be assigned by a compiler. | |
virtual Datatype * | getInputCast (const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const |
Find the data-type of the input to a specific PcodeOp. | |
virtual Datatype * | propagateType (Datatype *alttype, PcodeOp *op, Varnode *invn, Varnode *outvn, int4 inslot, int4 outslot) |
Propagate an incoming data-type across a specific PcodeOp. | |
virtual void | push (PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const =0 |
Push the specific PcodeOp to the emitter's RPN stack. | |
virtual void | printRaw (ostream &s, const PcodeOp *op)=0 |
Print (for debugging purposes) this specific PcodeOp to the stream. | |
virtual string | getOperatorName (const PcodeOp *op) const |
Get the name of the op-code as it should be displayed in context. | |
Static Public Member Functions | |
static void | registerInstructions (vector< TypeOp * > &inst, TypeFactory *tlst, const Translate *trans) |
Build a map from op-code value to the TypeOp information objects. | |
static void | selectJavaOperators (vector< TypeOp * > &inst, bool val) |
Toggle Java specific aspects of the op-code information. | |
static OpCode | floatSignManipulation (PcodeOp *op) |
Return the floating-point operation associated with the sign bit manipulation by the given PcodeOp. | |
static Datatype * | propagateToPointer (TypeFactory *t, Datatype *dt, int4 sz, int4 wordsz) |
Propagate a dereferenced data-type up to its pointer data-type through a LOAD or STORE. | |
static Datatype * | propagateFromPointer (TypeFactory *t, Datatype *dt, int4 sz) |
Propagate a pointer data-type down to its element data-type through a LOAD or STORE. | |
Protected Member Functions | |
virtual void | setMetatypeIn (type_metatype val) |
Set the data-type (as a meta-type) associated with inputs to this opcode. | |
virtual void | setMetatypeOut (type_metatype val) |
Set the data-type (as a meta-type) associated with outputs of this opcode. | |
virtual void | setSymbol (const string &nm) |
Set the display symbol associated with the op-code. | |
Protected Attributes | |
TypeFactory * | tlst |
Pointer to data-type factory. | |
OpCode | opcode |
The op-code value. | |
uint4 | opflags |
Cached pcode-op properties for this op-code. | |
uint4 | addlflags |
Additional properties. | |
string | name |
Symbol denoting this operation. | |
OpBehavior * | behave |
Object for emulating the behavior of the op-code. | |
Associate data-type and behavior information with a specific p-code op-code.
This holds all information about a p-code op-code. The main PcodeOp object holds this as a representative of the op-code. The evaluate* methods can be used to let the op-code act on constant input values. The getOutput* and getInput* methods are used to obtain data-type information that is specific to the op-code. This also holds other PcodeOp boolean properties that are set in common for the op-code.
anonymous enum |
ghidra::TypeOp::TypeOp | ( | TypeFactory * | t, |
OpCode | opc, | ||
const string & | n | ||
) |
|
inline |
Emulate the binary op-code on an input value.
sizeout | is the size of the output in bytes |
sizein | is the size of the inputs in bytes |
in1 | is the first input value |
in2 | is the second input value |
References behave, and ghidra::OpBehavior::evaluateBinary().
Referenced by ghidra::RuleAddMultCollapse::applyOp(), and ghidra::PcodeOp::collapse().
|
inline |
Emulate the unary op-code on an input value.
sizeout | is the size of the output in bytes |
sizein | is the size of the input in bytes |
in1 | is the input value |
References behave, and ghidra::OpBehavior::evaluateUnary().
Referenced by ghidra::PcodeOp::collapse().
Return the floating-point operation associated with the sign bit manipulation by the given PcodeOp.
Return CPUI_FLOAT_NEG if the sign bit is flipped, or CPUI_FLOAT_ABS if the sign bit is zeroed out. Otherwise CPUI_MAX is returned.
op | is the given PcodeOp to test |
References ghidra::calc_mask(), ghidra::PcodeOp::code(), ghidra::CPUI_FLOAT_ABS, ghidra::CPUI_FLOAT_NEG, ghidra::CPUI_INT_AND, ghidra::CPUI_INT_XOR, ghidra::CPUI_MAX, ghidra::PcodeOp::getIn(), ghidra::Varnode::getOffset(), ghidra::Varnode::getSize(), and ghidra::Varnode::isConstant().
Referenced by ghidra::RuleFloatSign::applyOp(), ghidra::RuleFloatSignCleanup::applyOp(), ghidra::TypeOpIntXor::propagateType(), and ghidra::TypeOpIntAnd::propagateType().
|
virtual |
Find the data-type of the input to a specific PcodeOp.
Calculate the actual data-type of the input to the specific PcodeOp. A null result indicates the input data-type is the same as or otherwise doesn't need a cast from the data-type of the actual input Varnode
op | is the specific PcodeOp |
slot | is the input to consider |
castStrategy | is the current casting strategy |
Reimplemented in ghidra::TypeOpCopy, ghidra::TypeOpLoad, ghidra::TypeOpStore, ghidra::TypeOpEqual, ghidra::TypeOpNotEqual, ghidra::TypeOpIntSless, ghidra::TypeOpIntSlessEqual, ghidra::TypeOpIntLess, ghidra::TypeOpIntLessEqual, ghidra::TypeOpIntZext, ghidra::TypeOpIntSext, ghidra::TypeOpIntRight, ghidra::TypeOpIntSright, ghidra::TypeOpIntDiv, ghidra::TypeOpIntSdiv, ghidra::TypeOpIntRem, ghidra::TypeOpIntSrem, ghidra::TypeOpFloatInt2Float, ghidra::TypeOpPiece, ghidra::TypeOpSubpiece, ghidra::TypeOpPtradd, ghidra::TypeOpPtrsub, ghidra::TypeOpSegment, ghidra::TypeOpCpoolref, and ghidra::TypeOpNew.
References ghidra::CastStrategy::castStandard(), ghidra::Varnode::getHighTypeReadFacing(), ghidra::PcodeOp::getIn(), ghidra::PcodeOp::inputTypeLocal(), and ghidra::Varnode::isAnnotation().
Referenced by ghidra::ActionSetCasts::castInput(), ghidra::TypeOpIntRight::getInputCast(), ghidra::TypeOpIntSright::getInputCast(), ghidra::TypeOpPtradd::getInputCast(), and ghidra::TypeOpPtrsub::getInputCast().
Find the minimal (or suggested) data-type of an input to this op-code.
The result should depend only on the op-code itself (and the size of the input)
op | is the PcodeOp being considered |
slot | is the input being considered |
Reimplemented in ghidra::TypeOpBinary, ghidra::TypeOpUnary, ghidra::TypeOpFunc, ghidra::TypeOpCbranch, ghidra::TypeOpCall, ghidra::TypeOpCallind, ghidra::TypeOpCallother, ghidra::TypeOpReturn, ghidra::TypeOpIntLeft, ghidra::TypeOpIntRight, ghidra::TypeOpIntSright, ghidra::TypeOpIndirect, ghidra::TypeOpPtradd, ghidra::TypeOpPtrsub, ghidra::TypeOpCpoolref, ghidra::TypeOpInsert, and ghidra::TypeOpExtract.
References ghidra::TypeFactory::getBase(), ghidra::PcodeOp::getIn(), ghidra::Varnode::getSize(), tlst, and ghidra::TYPE_UNKNOWN.
Referenced by ghidra::TypeOpCall::getInputLocal(), ghidra::TypeOpCallind::getInputLocal(), ghidra::TypeOpCallother::getInputLocal(), ghidra::TypeOpReturn::getInputLocal(), ghidra::TypeOpIndirect::getInputLocal(), and ghidra::PcodeOp::inputTypeLocal().
|
inlinevirtual |
Get the name of the op-code as it should be displayed in context.
Depending on the context, the same op-code may get displayed in different ways.
op | is the PcodeOp context |
Reimplemented in ghidra::TypeOpCallother, ghidra::TypeOpIntZext, ghidra::TypeOpIntSext, ghidra::TypeOpIntCarry, ghidra::TypeOpIntScarry, ghidra::TypeOpIntSborrow, ghidra::TypeOpPiece, and ghidra::TypeOpSubpiece.
References name.
Referenced by ghidra::TypeOpCallother::getOperatorName(), ghidra::PrintC::opCallother(), ghidra::PrintC::opFunc(), ghidra::TypeOpBinary::printRaw(), ghidra::TypeOpUnary::printRaw(), ghidra::TypeOpFunc::printRaw(), ghidra::TypeOpMulti::printRaw(), ghidra::TypeOpIndirect::printRaw(), ghidra::TypeOpSegment::printRaw(), ghidra::TypeOpCpoolref::printRaw(), and ghidra::TypeOpNew::printRaw().
Find the minimal (or suggested) data-type of an output to this op-code.
The result should depend only on the op-code itself (and the size of the output)
op | is the PcodeOp being considered |
Reimplemented in ghidra::TypeOpBinary, ghidra::TypeOpUnary, ghidra::TypeOpFunc, ghidra::TypeOpCall, ghidra::TypeOpCallind, ghidra::TypeOpCallother, ghidra::TypeOpPtradd, ghidra::TypeOpPtrsub, and ghidra::TypeOpCpoolref.
References ghidra::TypeFactory::getBase(), ghidra::PcodeOp::getOut(), ghidra::Varnode::getSize(), tlst, and ghidra::TYPE_UNKNOWN.
Referenced by ghidra::TypeOpCall::getOutputLocal(), ghidra::TypeOpCallind::getOutputLocal(), ghidra::TypeOpCallother::getOutputLocal(), ghidra::TypeOpCpoolref::getOutputLocal(), and ghidra::PcodeOp::outputTypeLocal().
|
virtual |
Find the data-type of the output that would be assigned by a compiler.
Calculate the actual data-type of the output for a specific PcodeOp as would be assigned by a C compiler parsing a grammar containing this op.
op | is the specific PcodeOp |
castStrategy | is the current casting strategy |
Reimplemented in ghidra::TypeOpCopy, ghidra::TypeOpLoad, ghidra::TypeOpIntAdd, ghidra::TypeOpIntSub, ghidra::TypeOpInt2Comp, ghidra::TypeOpIntNegate, ghidra::TypeOpIntXor, ghidra::TypeOpIntAnd, ghidra::TypeOpIntOr, ghidra::TypeOpIntLeft, ghidra::TypeOpIntRight, ghidra::TypeOpIntSright, ghidra::TypeOpIntMult, ghidra::TypeOpPiece, ghidra::TypeOpSubpiece, ghidra::TypeOpPtradd, ghidra::TypeOpPtrsub, and ghidra::TypeOpSegment.
References ghidra::PcodeOp::outputTypeLocal().
Referenced by ghidra::ActionSetCasts::castOutput(), and ghidra::TypeOpPtrsub::getOutputToken().
bool ghidra::TypeOp::isCommutative | ( | void | ) | const |
Return true if this op-code is commutative.
References ghidra::PcodeOp::commutative, and opflags.
|
pure virtual |
Print (for debugging purposes) this specific PcodeOp to the stream.
s | is the output stream |
op | is the specific PcodeOp to print |
Implemented in ghidra::TypeOpBinary, ghidra::TypeOpUnary, ghidra::TypeOpFunc, ghidra::TypeOpCopy, ghidra::TypeOpLoad, ghidra::TypeOpStore, ghidra::TypeOpBranch, ghidra::TypeOpCbranch, ghidra::TypeOpBranchind, ghidra::TypeOpCall, ghidra::TypeOpCallind, ghidra::TypeOpCallother, ghidra::TypeOpReturn, ghidra::TypeOpIntSright, ghidra::TypeOpMulti, ghidra::TypeOpIndirect, ghidra::TypeOpCast, ghidra::TypeOpPtradd, ghidra::TypeOpPtrsub, ghidra::TypeOpSegment, ghidra::TypeOpCpoolref, and ghidra::TypeOpNew.
Referenced by ghidra::PcodeOp::printRaw().
|
static |
Propagate a pointer data-type down to its element data-type through a LOAD or STORE.
t | is the TypeFactory containing the data-types |
dt | is the pointer data-type |
sz | is the size of the dereferenced pointer |
References ghidra::TypePointerRel::getByteOffset(), ghidra::TypeFactory::getExactPiece(), ghidra::Datatype::getMetatype(), ghidra::TypePointerRel::getParent(), ghidra::Datatype::getSize(), ghidra::TypeFactory::getTypePartialEnum(), ghidra::Datatype::hasStripped(), ghidra::Datatype::isEnumType(), ghidra::Datatype::isPointerRel(), ghidra::Datatype::isVariableLength(), and ghidra::TYPE_PTR.
Referenced by ghidra::TypeOpLoad::propagateType(), and ghidra::TypeOpStore::propagateType().
|
static |
Propagate a dereferenced data-type up to its pointer data-type through a LOAD or STORE.
Don't create more than a depth of 1, i.e. ptr->ptr
t | is the TypeFactory containing the data-types |
dt | is the pointed-to data-type |
sz | is the size of the pointer |
wordsz | is the wordsize associated with the pointer |
References ghidra::TypeFactory::getBase(), ghidra::Datatype::getMetatype(), ghidra::Datatype::getSize(), ghidra::TypeFactory::getTypePointer(), ghidra::TYPE_PARTIALSTRUCT, ghidra::TYPE_PTR, and ghidra::TYPE_UNKNOWN.
Referenced by ghidra::TypeOpLoad::propagateType(), and ghidra::TypeOpStore::propagateType().
|
virtual |
Propagate an incoming data-type across a specific PcodeOp.
The data-type can propagate between any two Varnodes attached to the PcodeOp, either in or out. The pair invn and inslot indicate the Varnode holding the incoming data-type. The pair outvn and outslot indicate the Varnode that will hold the outgoing data-type. The data-type for the outgoing Varnode is returned, which may be different then the incoming data-type as the PcodeOp can transform the data-type as it propagates.
alttype | is the incoming data-type |
op | is the PcodeOp to propagate across |
invn | is the Varnode holding the incoming data-type |
outvn | is the Varnode that will hold the outgoing data-type |
inslot | indicates how the incoming Varnode is attached to the PcodeOp (-1 indicates output >= indicates input) |
outslot | indicates how the outgoing Varnode is attached to the PcodeOp |
Reimplemented in ghidra::TypeOpCopy, ghidra::TypeOpLoad, ghidra::TypeOpStore, ghidra::TypeOpEqual, ghidra::TypeOpNotEqual, ghidra::TypeOpIntSless, ghidra::TypeOpIntSlessEqual, ghidra::TypeOpIntLess, ghidra::TypeOpIntLessEqual, ghidra::TypeOpIntAdd, ghidra::TypeOpIntXor, ghidra::TypeOpIntAnd, ghidra::TypeOpIntOr, ghidra::TypeOpMulti, ghidra::TypeOpIndirect, ghidra::TypeOpPiece, ghidra::TypeOpSubpiece, ghidra::TypeOpPtradd, ghidra::TypeOpPtrsub, ghidra::TypeOpSegment, and ghidra::TypeOpNew.
Referenced by ghidra::AddTreeState::assignPropagatedType(), and ghidra::ActionInferTypes::propagateTypeEdge().
|
pure virtual |
Push the specific PcodeOp to the emitter's RPN stack.
Given a specific language and PcodeOp, emit the expression rooted at the operation.
lng | is the PrintLanguage to emit |
op | is the specific PcodeOp |
readOp | is the PcodeOp consuming the output (or null) |
Implemented in ghidra::TypeOpCopy, ghidra::TypeOpLoad, ghidra::TypeOpStore, ghidra::TypeOpBranch, ghidra::TypeOpCbranch, ghidra::TypeOpBranchind, ghidra::TypeOpCall, ghidra::TypeOpCallind, ghidra::TypeOpCallother, ghidra::TypeOpReturn, ghidra::TypeOpEqual, ghidra::TypeOpNotEqual, ghidra::TypeOpIntSless, ghidra::TypeOpIntSlessEqual, ghidra::TypeOpIntLess, ghidra::TypeOpIntLessEqual, ghidra::TypeOpIntZext, ghidra::TypeOpIntSext, ghidra::TypeOpIntAdd, ghidra::TypeOpIntSub, ghidra::TypeOpIntCarry, ghidra::TypeOpIntScarry, ghidra::TypeOpIntSborrow, ghidra::TypeOpInt2Comp, ghidra::TypeOpIntNegate, ghidra::TypeOpIntXor, ghidra::TypeOpIntAnd, ghidra::TypeOpIntOr, ghidra::TypeOpIntLeft, ghidra::TypeOpIntRight, ghidra::TypeOpIntSright, ghidra::TypeOpIntMult, ghidra::TypeOpIntDiv, ghidra::TypeOpIntSdiv, ghidra::TypeOpIntRem, ghidra::TypeOpIntSrem, ghidra::TypeOpBoolNegate, ghidra::TypeOpBoolXor, ghidra::TypeOpBoolAnd, ghidra::TypeOpBoolOr, ghidra::TypeOpFloatEqual, ghidra::TypeOpFloatNotEqual, ghidra::TypeOpFloatLess, ghidra::TypeOpFloatLessEqual, ghidra::TypeOpFloatNan, ghidra::TypeOpFloatAdd, ghidra::TypeOpFloatDiv, ghidra::TypeOpFloatMult, ghidra::TypeOpFloatSub, ghidra::TypeOpFloatNeg, ghidra::TypeOpFloatAbs, ghidra::TypeOpFloatSqrt, ghidra::TypeOpFloatInt2Float, ghidra::TypeOpFloatFloat2Float, ghidra::TypeOpFloatTrunc, ghidra::TypeOpFloatCeil, ghidra::TypeOpFloatFloor, ghidra::TypeOpFloatRound, ghidra::TypeOpMulti, ghidra::TypeOpIndirect, ghidra::TypeOpPiece, ghidra::TypeOpSubpiece, ghidra::TypeOpCast, ghidra::TypeOpPtradd, ghidra::TypeOpPtrsub, ghidra::TypeOpSegment, ghidra::TypeOpCpoolref, ghidra::TypeOpNew, ghidra::TypeOpInsert, ghidra::TypeOpExtract, ghidra::TypeOpPopcount, and ghidra::TypeOpLzcount.
Referenced by ghidra::PrintC::emitExpression(), ghidra::PrintC::pushImpliedField(), and ghidra::PrintLanguage::recurse().
|
inline |
Reverse the binary op-code operation, recovering a constant input value.
If the output value and one of the input values is known, recover the value of the other input.
slot | is the input slot to recover |
sizeout | is the size of the output in bytes |
out | is the output value |
sizein | is the size of the inputs in bytes |
in | is the known input value |
References behave, and ghidra::OpBehavior::recoverInputBinary().
Referenced by ghidra::JumpBasic::backup2Switch().
|
inline |
Reverse the unary op-code operation, recovering a constant input value.
If the output value is known, recover the input value.
sizeout | is the size of the output in bytes |
out | is the output value |
sizein | is the size of the input in bytes |
References behave, and ghidra::OpBehavior::recoverInputUnary().
Referenced by ghidra::JumpBasic::backup2Switch().
|
static |
Build a map from op-code value to the TypeOp information objects.
inst | will hold the array of TypeOp objects, indexed on op-code |
tlst | is the corresponding TypeFactory for the Architecture |
trans | is the Translate object for floating-point formats |
References ghidra::CPUI_BOOL_AND, ghidra::CPUI_BOOL_NEGATE, ghidra::CPUI_BOOL_OR, ghidra::CPUI_BOOL_XOR, ghidra::CPUI_BRANCH, ghidra::CPUI_BRANCHIND, ghidra::CPUI_CALL, ghidra::CPUI_CALLIND, ghidra::CPUI_CALLOTHER, ghidra::CPUI_CAST, ghidra::CPUI_CBRANCH, ghidra::CPUI_COPY, ghidra::CPUI_CPOOLREF, ghidra::CPUI_EXTRACT, ghidra::CPUI_FLOAT_ABS, ghidra::CPUI_FLOAT_ADD, ghidra::CPUI_FLOAT_CEIL, ghidra::CPUI_FLOAT_DIV, ghidra::CPUI_FLOAT_EQUAL, ghidra::CPUI_FLOAT_FLOAT2FLOAT, ghidra::CPUI_FLOAT_FLOOR, ghidra::CPUI_FLOAT_INT2FLOAT, ghidra::CPUI_FLOAT_LESS, ghidra::CPUI_FLOAT_LESSEQUAL, ghidra::CPUI_FLOAT_MULT, ghidra::CPUI_FLOAT_NAN, ghidra::CPUI_FLOAT_NEG, ghidra::CPUI_FLOAT_NOTEQUAL, ghidra::CPUI_FLOAT_ROUND, ghidra::CPUI_FLOAT_SQRT, ghidra::CPUI_FLOAT_SUB, ghidra::CPUI_FLOAT_TRUNC, ghidra::CPUI_INDIRECT, ghidra::CPUI_INSERT, ghidra::CPUI_INT_2COMP, ghidra::CPUI_INT_ADD, ghidra::CPUI_INT_AND, ghidra::CPUI_INT_CARRY, ghidra::CPUI_INT_DIV, ghidra::CPUI_INT_EQUAL, ghidra::CPUI_INT_LEFT, ghidra::CPUI_INT_LESS, ghidra::CPUI_INT_LESSEQUAL, ghidra::CPUI_INT_MULT, ghidra::CPUI_INT_NEGATE, ghidra::CPUI_INT_NOTEQUAL, ghidra::CPUI_INT_OR, ghidra::CPUI_INT_REM, ghidra::CPUI_INT_RIGHT, ghidra::CPUI_INT_SBORROW, ghidra::CPUI_INT_SCARRY, ghidra::CPUI_INT_SDIV, ghidra::CPUI_INT_SEXT, ghidra::CPUI_INT_SLESS, ghidra::CPUI_INT_SLESSEQUAL, ghidra::CPUI_INT_SREM, ghidra::CPUI_INT_SRIGHT, ghidra::CPUI_INT_SUB, ghidra::CPUI_INT_XOR, ghidra::CPUI_INT_ZEXT, ghidra::CPUI_LOAD, ghidra::CPUI_LZCOUNT, ghidra::CPUI_MAX, ghidra::CPUI_MULTIEQUAL, ghidra::CPUI_NEW, ghidra::CPUI_PIECE, ghidra::CPUI_POPCOUNT, ghidra::CPUI_PTRADD, ghidra::CPUI_PTRSUB, ghidra::CPUI_RETURN, ghidra::CPUI_SEGMENTOP, ghidra::CPUI_STORE, ghidra::CPUI_SUBPIECE, and tlst.
Referenced by ghidra::Architecture::buildInstructions().
|
static |
Toggle Java specific aspects of the op-code information.
Change basic data-type info (signed vs unsigned) and operator names ( '>>' vs '>>>' ) depending on the specific language.
inst | is the array of TypeOp information objects |
val | is set to true for Java operators, false for C operators |
References ghidra::CPUI_INT_AND, ghidra::CPUI_INT_NEGATE, ghidra::CPUI_INT_OR, ghidra::CPUI_INT_RIGHT, ghidra::CPUI_INT_XOR, ghidra::CPUI_INT_ZEXT, ghidra::TYPE_INT, ghidra::TYPE_UINT, and ghidra::TYPE_UNKNOWN.
Referenced by ghidra::PrintC::adjustTypeOperators(), and ghidra::PrintJava::adjustTypeOperators().
|
inlineprotectedvirtual |
Set the data-type (as a meta-type) associated with inputs to this opcode.
val | is the data-type of inputs |
Reimplemented in ghidra::TypeOpBinary, ghidra::TypeOpUnary, and ghidra::TypeOpFunc.
|
inlineprotectedvirtual |
Set the data-type (as a meta-type) associated with outputs of this opcode.
val | is the data-type of outputs |
Reimplemented in ghidra::TypeOpBinary, ghidra::TypeOpUnary, and ghidra::TypeOpFunc.