Class JitPassage.DecodedPcodeOp
- Direct Known Subclasses:
JitPassage.DecodeErrorPcodeOp
,JitPassage.NopPcodeOp
- Enclosing class:
JitPassage
PcodeOp
that carries along with it the address and decode context
where it occurred.
There is a difference between at
's address
vs.
seqnum
's target
. The former is
determined by the JitPassageDecoder
and applied to all p-code ops generated at that
address (and context value), including those from injected Sleigh. The latter is determined
by the Instruction
(or injected PcodeProgram
), which have less information
about their origins. There are also JitPassage.DecodeErrorPcodeOp
and JitPassage.NopPcodeOp
, which
are synthesized by the JitPassageDecoder
without an instruction or inject. This
information is required for bookkeeping, esp., when updating the emulator's program counter
and decode context when a p-code op produces an unexpected run-time error.
-
Field Summary
Fields inherited from class ghidra.program.model.pcode.PcodeOp
BOOL_AND, BOOL_NEGATE, BOOL_OR, BOOL_XOR, BRANCH, BRANCHIND, CALL, CALLIND, CALLOTHER, CAST, CBRANCH, COPY, CPOOLREF, EXTRACT, FLOAT_ABS, FLOAT_ADD, FLOAT_CEIL, FLOAT_DIV, FLOAT_EQUAL, FLOAT_FLOAT2FLOAT, FLOAT_FLOOR, FLOAT_INT2FLOAT, FLOAT_LESS, FLOAT_LESSEQUAL, FLOAT_MULT, FLOAT_NAN, FLOAT_NEG, FLOAT_NOTEQUAL, FLOAT_ROUND, FLOAT_SQRT, FLOAT_SUB, FLOAT_TRUNC, INDIRECT, INSERT, INT_2COMP, INT_ADD, INT_AND, INT_CARRY, INT_DIV, INT_EQUAL, INT_LEFT, INT_LESS, INT_LESSEQUAL, INT_MULT, INT_NEGATE, INT_NOTEQUAL, INT_OR, INT_REM, INT_RIGHT, INT_SBORROW, INT_SCARRY, INT_SDIV, INT_SEXT, INT_SLESS, INT_SLESSEQUAL, INT_SREM, INT_SRIGHT, INT_SUB, INT_XOR, INT_ZEXT, LOAD, LZCOUNT, MULTIEQUAL, NEW, PCODE_MAX, PIECE, POPCOUNT, PTRADD, PTRSUB, RETURN, SEGMENTOP, STORE, SUBPIECE, UNIMPLEMENTED
-
Constructor Summary
ConstructorsConstructorDescriptionDecodedPcodeOp
(JitPassage.AddrCtx at, PcodeOp original) Re-write a p-code op including its address and context value -
Method Summary
Modifier and TypeMethodDescriptiongetAt()
Get the address and context value where this op was producedGet the decode context where this op was producedGet the address where this op was producedboolean
Check if this op represents the start of an instructionMethods inherited from class ghidra.program.model.pcode.PcodeOp
decode, encodeRaw, getBasicIter, getInput, getInputs, getInsertIter, getMnemonic, getMnemonic, getNumInputs, getOpcode, getOpcode, getOutput, getParent, getSeqnum, getSlot, hashCode, insertInput, isAssignment, isCommutative, isCommutative, isDead, removeInput, setInput, setOpcode, setOrder, setOutput, setTime, toString
-
Constructor Details
-
DecodedPcodeOp
Re-write a p-code op including its address and context valueAside from
at
, everything is copied from the given original p-code op.- Parameters:
at
- the address and context value where the op was producedoriginal
- the original p-code op
-
-
Method Details
-
getAt
Get the address and context value where this op was produced- Returns:
- the address-context pair
-
getCounter
Get the address where this op was produced- Returns:
- the address
-
getContext
Get the decode context where this op was produced- Returns:
- the decode context
-
isInstructionStart
public boolean isInstructionStart()Check if this op represents the start of an instructionIf this p-code op was produced by an inject, this will return false! It only returns true for an op that is genuinely the first op in the result of
Instruction.getPcode()
. WARNING: This should not be used for branching purposes, because branches to a given address are meant to target any injections there, too. Currently, this is used only to count the number of instructions actually executed.- Returns:
- true if this op is the first of an instruction
- See Also:
-