Class FoldingExecutor
- Direct Known Subclasses:
FoldRevalidator.RevalidateExecutor
An executor that records and/or removes folded constants into a passage decoder.
-
Field Summary
FieldsFields inherited from class PcodeExecutor
arithmetic, language, OPIDX_BRANCH_TARGET, OPIDX_CALLOTHER_OP_NUMBER, OPIDX_CBRANCH_PRED, OPIDX_DEFEF_SPACE, OPIDX_DEREF_OFFSET, OPIDX_STORE_VALUE, pc, pcSize, reason -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterLoad(PcodeOp op, AddressSpace space, MaskedBytes offset, int size, MaskedBytes value) Extension point: logic proceeding a loadprotected voidafterStore(PcodeOp op, AddressSpace space, MaskedBytes offset, int size, MaskedBytes value) Extension point: logic proceeding a storeprotected voiddoFoldIndirectBranch(PcodeOp op, PcodeFrame frame) This attempts to resolve a folded constant address.voidexecute(PcodeProgram program) Interpret the given program with the passage decoder's userop libraryvoidExecute the given binary opvoidexecuteCallother(PcodeOp op, PcodeFrame frame, PcodeUseropLibrary<MaskedBytes> library) Execute a userop callvoidexecuteConditionalBranch(PcodeOp op, PcodeFrame frame) Execute a conditional branchvoidexecuteIndirectBranch(PcodeOp op, PcodeFrame frame) Execute an indirect branchvoidexecuteIndirectCall(PcodeOp op, PcodeFrame frame) Execute an indirect callvoidexecuteLoad(PcodeOp op) Execute a loadvoidexecuteReturn(PcodeOp op, PcodeFrame frame) Execute a returnvoidexecuteStore(PcodeOp op) Execute a storevoidexecuteUnaryOp(PcodeOp op, UnaryOpBehavior b) Execute the given unary opgetState()Get the state bound to this executorprotected PcodeUseropLibrary.PcodeUseropDefinition<?> getUserop(PcodeOp op, PcodeFrame frame, PcodeUseropLibrary<?> library) Methods inherited from class PcodeExecutor
badOp, beforeLoad, beforeStore, begin, begin, branchInternal, branchToAddress, branchToOffset, branchToOffset, checkInjectedTarget, doExecuteBranch, doExecuteIndirectBranch, execute, execute, executeBranch, executeCall, executeSleigh, finish, getArithmetic, getBranchTarget, getCallotherOpNumber, getConditionalBranchPredicate, getIndirectBranchTarget, getIntConst, getLanguage, getLoadStoreOffset, getLoadStoreSpace, getReason, getStoreValue, getUseropName, onMissingUseropDef, skip, step, stepOp
-
Field Details
-
state
-
-
Constructor Details
-
FoldingExecutor
-
-
Method Details
-
getState
Description copied from class:PcodeExecutorGet the state bound to this executor- Overrides:
getStatein classPcodeExecutor<MaskedBytes>- Returns:
- the state
-
execute
Interpret the given program with the passage decoder's userop library- Parameters:
program- the p-code to interpret
-
executeUnaryOp
Description copied from class:PcodeExecutorExecute the given unary op- Overrides:
executeUnaryOpin classPcodeExecutor<MaskedBytes>- Parameters:
op- the opb- the op behavior
-
executeBinaryOp
Description copied from class:PcodeExecutorExecute the given binary op- Overrides:
executeBinaryOpin classPcodeExecutor<MaskedBytes>- Parameters:
op- the opb- the op behavior
-
executeLoad
Description copied from class:PcodeExecutorExecute a load- Overrides:
executeLoadin classPcodeExecutor<MaskedBytes>- Parameters:
op- the op
-
afterLoad
protected void afterLoad(PcodeOp op, AddressSpace space, MaskedBytes offset, int size, MaskedBytes value) Description copied from class:PcodeExecutorExtension point: logic proceeding a load- Overrides:
afterLoadin classPcodeExecutor<MaskedBytes>- Parameters:
op- the op performing the loadspace- the address space loaded fromoffset- the offset about loaded fromsize- the size in bytes loadedvalue- the value loaded
-
executeStore
Description copied from class:PcodeExecutorExecute a store- Overrides:
executeStorein classPcodeExecutor<MaskedBytes>- Parameters:
op- the op
-
afterStore
protected void afterStore(PcodeOp op, AddressSpace space, MaskedBytes offset, int size, MaskedBytes value) Description copied from class:PcodeExecutorExtension point: logic proceeding a store- Overrides:
afterStorein classPcodeExecutor<MaskedBytes>- Parameters:
op- the op performing the storespace- the address space to be stored tooffset- the offset about to be stored tosize- the size in bytes to be storedvalue- the value stored
-
executeConditionalBranch
Description copied from class:PcodeExecutorExecute a conditional branch- Overrides:
executeConditionalBranchin classPcodeExecutor<MaskedBytes>- Parameters:
op- the opframe- the frame
-
doFoldIndirectBranch
This attempts to resolve a folded constant address. If it succeeds, it delegates toPcodeExecutor.branchToAddress(PcodeOp, Address). Otherwise, it delegates toPcodeExecutor.doExecuteIndirectBranch(PcodeOp, PcodeFrame).- Parameters:
op- the p-code opframe- the frame
-
executeIndirectBranch
Description copied from class:PcodeExecutorExecute an indirect branchThis merely defers to
PcodeExecutor.doExecuteIndirectBranch(PcodeOp, PcodeFrame). To instrument the operation, override this. To modify or instrument indirect branching in general, overridePcodeExecutor.doExecuteIndirectBranch(PcodeOp, PcodeFrame).- Overrides:
executeIndirectBranchin classPcodeExecutor<MaskedBytes>- Parameters:
op- the opframe- the frame
-
executeIndirectCall
Description copied from class:PcodeExecutorExecute an indirect call- Overrides:
executeIndirectCallin classPcodeExecutor<MaskedBytes>- Parameters:
op- the opframe- the frame
-
executeReturn
Description copied from class:PcodeExecutorExecute a return- Overrides:
executeReturnin classPcodeExecutor<MaskedBytes>- Parameters:
op- the opframe- the frame
-
getUserop
protected PcodeUseropLibrary.PcodeUseropDefinition<?> getUserop(PcodeOp op, PcodeFrame frame, PcodeUseropLibrary<?> library) -
executeCallother
Description copied from class:PcodeExecutorExecute a userop call- Overrides:
executeCallotherin classPcodeExecutor<MaskedBytes>- Parameters:
op- the opframe- the framelibrary- the library of userops
-