Class InsnEmulator<T extends IInstructionOperand>
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.simulator.InsnEmulator<T>
- All Implemented Interfaces:
IInsnEmulator<T>
public abstract class InsnEmulator<T extends IInstructionOperand>
extends Object
implements IInsnEmulator<T>
Main class that can emulate an instruction and retrieve the correct result. It is based on:
- UPDATE_*** which provides the field(s) to be updated
- JUMP_*** which computes the new value to assign
- UPDATE_*** which provides the field(s) to be updated
- JUMP_*** which computes the new value to assign
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.pnfsoftware.jeb.core.units.code.asm.simulator.IInsnEmulator
IInsnEmulator.BranchType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
What is the new value: from 0x0100 to 0xFF00static final int
saves the return address in LRstatic final int
static final int
What is updated: from 0x00 to 0xFFstatic final int
static final int
Always Jump -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn BranchType (JUMP or LINK).int
getFlags()
boolean
Indicate if the instruction can update the PC (by another address than the following one).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.simulator.IInsnEmulator
compute
-
Field Details
-
NO_FLAG
public static final int NO_FLAG- See Also:
-
UPDATE_MASK
public static final int UPDATE_MASKWhat is updated: from 0x00 to 0xFF- See Also:
-
UPDATE_NONE
public static final int UPDATE_NONE- See Also:
-
UPDATE_PC
public static final int UPDATE_PCAlways Jump- See Also:
-
JUMP_MASK
public static final int JUMP_MASKWhat is the new value: from 0x0100 to 0xFF00- See Also:
-
JUMP_LAST_OPERAND
public static final int JUMP_LAST_OPERAND- See Also:
-
LINK
public static final int LINKsaves the return address in LR- See Also:
-
-
Constructor Details
-
InsnEmulator
public InsnEmulator(int flags)
-
-
Method Details
-
isPCUpdated
public boolean isPCUpdated()Description copied from interface:IInsnEmulator
Indicate if the instruction can update the PC (by another address than the following one).- Specified by:
isPCUpdated
in interfaceIInsnEmulator<T extends IInstructionOperand>
-
getBranchType
Description copied from interface:IInsnEmulator
Return BranchType (JUMP or LINK). See later if more is needed.- Specified by:
getBranchType
in interfaceIInsnEmulator<T extends IInstructionOperand>
-
getFlags
public int getFlags()
-