public abstract class

InsnEmulator

extends Object
implements IInsnEmulator<T extends IInstructionOperand>
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.simulator.InsnEmulator<T extends com.pnfsoftware.jeb.core.units.code.IInstructionOperand>

Class Overview

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

Summary

Constants
int JUMP_LAST_OPERAND
int JUMP_MASK What is the new value: from 0x0100 to 0xFF00
int LINK saves the return address in LR
int NO_FLAG
int UPDATE_MASK What is updated: from 0x00 to 0xFF
int UPDATE_NONE
int UPDATE_PC Always Jump
Public Constructors
InsnEmulator(int flags)
Public Methods
IInsnEmulator.BranchType getBranchType()
Return BranchType (JUMP or LINK).
int getFlags()
boolean isPCUpdated()
Indicate if the instruction can update the PC (by another address than the following one).
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.units.code.asm.simulator.IInsnEmulator

Constants

public static final int JUMP_LAST_OPERAND

Constant Value: 256 (0x00000100)

public static final int JUMP_MASK

What is the new value: from 0x0100 to 0xFF00

Constant Value: 65280 (0x0000ff00)

public static final int LINK

saves the return address in LR

Constant Value: 65536 (0x00010000)

public static final int NO_FLAG

Constant Value: 0 (0x00000000)

public static final int UPDATE_MASK

What is updated: from 0x00 to 0xFF

Constant Value: 255 (0x000000ff)

public static final int UPDATE_NONE

Constant Value: 0 (0x00000000)

public static final int UPDATE_PC

Always Jump

Constant Value: 1 (0x00000001)

Public Constructors

public InsnEmulator (int flags)

Public Methods

public IInsnEmulator.BranchType getBranchType ()

Return BranchType (JUMP or LINK). See later if more is needed.

public int getFlags ()

public boolean isPCUpdated ()

Indicate if the instruction can update the PC (by another address than the following one).