com.pnfsoftware.jeb.core.units.code.asm.simulator.IInsnEmulator<T extends com.pnfsoftware.jeb.core.units.code.IInstructionOperand> |
Known Indirect Subclasses
InsnEmulator<T extends IInstructionOperand>
|
High Level design for an instruction emulator: it indicates if the PC is updated (meaning a jump
will be done, see getBranchType()
for jump type) and is able to compute the result of
the operation. Please note that the
#compute(long, int, IInstructionOperand[], IMachineContext) implementation is not
guaranteed, plus it can depends on context (register values, memory access).
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | IInsnEmulator.BranchType |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract Long |
compute(byte[] code, long instructionAddress, int mode, T[] armOperands, IMachineContext context)
Compute the result of the instruction (ADD, SUB...).
| ||||||||||
abstract IInsnEmulator.BranchType |
getBranchType()
Return BranchType (JUMP or LINK).
| ||||||||||
abstract boolean |
isPCUpdated()
Indicate if the instruction can update the PC (by another address than the following one).
|
Compute the result of the instruction (ADD, SUB...). When the context is not provided or has missing entries, this method will return null as result or raise a ProcessorException. If this operation is not implemented, an UnsupportedOperationException will be raised.
ProcessorException |
---|
Return BranchType (JUMP or LINK). See later if more is needed.
Indicate if the instruction can update the PC (by another address than the following one).