dioscuri.module.cpu32
Class ProtectedModeUBlock

java.lang.Object
  extended by dioscuri.module.cpu32.ProtectedModeUBlock
All Implemented Interfaces:
CodeBlock, MicrocodeSet, ProtectedModeCodeBlock

public class ProtectedModeUBlock
extends java.lang.Object
implements ProtectedModeCodeBlock, MicrocodeSet

Author:
Bram Lohman, Bart Kiers

Field Summary
protected  int[] cumulativeX86Length
           
protected  int[] microcodes
           
 
Fields inherited from interface dioscuri.module.cpu32.MicrocodeSet
AAA, AAD, AAM, AAS, ADC, ADC_O16_FLAGS, ADC_O32_FLAGS, ADC_O8_FLAGS, ADD, ADD_O16_FLAGS, ADD_O32_FLAGS, ADD_O8_FLAGS, ADDR_2EAX, ADDR_2EBP, ADDR_2EBX, ADDR_2ECX, ADDR_2EDI, ADDR_2EDX, ADDR_2ESI, ADDR_2ESP, ADDR_2REG1, ADDR_4EAX, ADDR_4EBP, ADDR_4EBX, ADDR_4ECX, ADDR_4EDI, ADDR_4EDX, ADDR_4ESI, ADDR_4ESP, ADDR_4REG1, ADDR_8EAX, ADDR_8EBP, ADDR_8EBX, ADDR_8ECX, ADDR_8EDI, ADDR_8EDX, ADDR_8ESI, ADDR_8ESP, ADDR_8REG1, ADDR_AX, ADDR_BP, ADDR_BX, ADDR_CX, ADDR_DI, ADDR_DX, ADDR_EAX, ADDR_EBP, ADDR_EBX, ADDR_ECX, ADDR_EDI, ADDR_EDX, ADDR_ESI, ADDR_ESP, ADDR_IB, ADDR_ID, ADDR_IW, ADDR_MASK16, ADDR_REG1, ADDR_SI, ADDR_SP, ADDR_uAL, AND, BITWISE_FLAGS_O16, BITWISE_FLAGS_O32, BITWISE_FLAGS_O8, BOUND_O16, BOUND_O32, BSF, BSR, BSWAP, BT_MEM, BT_O16, BT_O32, BTC_MEM, BTC_O16, BTC_O32, BTR_MEM, BTR_O16, BTR_O32, BTS_MEM, BTS_O16, BTS_O32, CALL_ABS_O16_A16, CALL_ABS_O16_A32, CALL_ABS_O32_A16, CALL_ABS_O32_A32, CALL_FAR_O16_A16, CALL_FAR_O16_A32, CALL_FAR_O32_A16, CALL_FAR_O32_A32, CALL_O16_A16, CALL_O16_A32, CALL_O32_A16, CALL_O32_A32, CDQ, CLC, CLD, CLI, CLTS, CMC, CMOVA, CMOVC, CMOVG, CMOVL, CMOVNA, CMOVNC, CMOVNG, CMOVNL, CMOVNO, CMOVNP, CMOVNS, CMOVNZ, CMOVO, CMOVP, CMOVS, CMOVZ, CMPSB_A16, CMPSB_A32, CMPSD_A16, CMPSD_A32, CMPSW_A16, CMPSW_A32, CMPXCHG, CMPXCHG_O16_FLAGS, CMPXCHG_O32_FLAGS, CMPXCHG_O8_FLAGS, CMPXCHG8B, CPUID, CWD, DAA, DAS, DEC, DEC_O16_FLAGS, DEC_O32_FLAGS, DEC_O8_FLAGS, DIV_O16, DIV_O32, DIV_O8, EIP_UPDATE, ENTER_O16_A16, ENTER_O16_A32, ENTER_O32_A16, ENTER_O32_A32, F2XM1, FABS, FADD, FBCD2F, FCHECK0, FCHECK1, FCHOP, FCHS, FCLEX, FCMOVB, FCMOVBE, FCMOVE, FCMOVNB, FCMOVNBE, FCMOVNE, FCMOVNU, FCMOVU, FCOM, FCOMI, FCOS, FDECSTP, FDIV, FF2BCD, FFREE, FINCSTP, FINIT, FLDENV_14, FLDENV_28, FLOAD0_1, FLOAD0_L2E, FLOAD0_L2TEN, FLOAD0_LN2, FLOAD0_LOG2, FLOAD0_MEM_DOUBLE, FLOAD0_MEM_EXTENDED, FLOAD0_MEM_SINGLE, FLOAD0_PI, FLOAD0_POS0, FLOAD0_REG0, FLOAD0_REG0L, FLOAD0_ST0, FLOAD0_STN, FLOAD1_MEM_DOUBLE, FLOAD1_MEM_EXTENDED, FLOAD1_MEM_SINGLE, FLOAD1_POS0, FLOAD1_REG0, FLOAD1_REG0L, FLOAD1_ST0, FLOAD1_STN, FMUL, FPATAN, FPOP, FPREM, FPREM1, FPTAN, FPUSH, FRNDINT, FRSTOR_108, FRSTOR_94, FSAVE_108, FSAVE_94, FSCALE, FSIN, FSINCOS, FSQRT, FSTENV_14, FSTENV_28, FSTORE0_MEM_DOUBLE, FSTORE0_MEM_EXTENDED, FSTORE0_MEM_SINGLE, FSTORE0_REG0, FSTORE0_ST0, FSTORE0_STN, FSTORE1_MEM_DOUBLE, FSTORE1_MEM_EXTENDED, FSTORE1_MEM_SINGLE, FSTORE1_REG0, FSTORE1_ST0, FSTORE1_STN, FSUB, FUCOM, FUCOMI, FWAIT, FXAM, FXTRACT, FYL2X, FYL2XP1, HALT, IDIV_O16, IDIV_O32, IDIV_O8, IMUL_O16, IMUL_O32, IMULA_O16, IMULA_O32, IMULA_O8, IN_O16, IN_O32, IN_O8, INC, INC_O16_FLAGS, INC_O32_FLAGS, INC_O8_FLAGS, INSB_A16, INSB_A32, INSD_A16, INSD_A32, INSW_A16, INSW_A32, INT_O16_A16, INT_O16_A32, INT_O32_A16, INT_O32_A32, INT3_O16_A16, INT3_O16_A32, INT3_O32_A16, INT3_O32_A32, INTO_O16_A16, INTO_O16_A32, INTO_O32_A16, INTO_O32_A32, INVLPG, IRET_O16_A16, IRET_O16_A32, IRET_O32_A16, IRET_O32_A32, JA_O16, JA_O32, JA_O8, JC_O16, JC_O32, JC_O8, JCXZ, JECXZ, JG_O16, JG_O32, JG_O8, JL_O16, JL_O32, JL_O8, JNA_O16, JNA_O32, JNA_O8, JNC_O16, JNC_O32, JNC_O8, JNG_O16, JNG_O32, JNG_O8, JNL_O16, JNL_O32, JNL_O8, JNO_O16, JNO_O32, JNO_O8, JNP_O16, JNP_O32, JNP_O8, JNS_O16, JNS_O32, JNS_O8, JNZ_O16, JNZ_O32, JNZ_O8, JO_O16, JO_O32, JO_O8, JP_O16, JP_O32, JP_O8, JS_O16, JS_O32, JS_O8, JUMP_ABS_O16, JUMP_ABS_O32, JUMP_FAR_O16, JUMP_FAR_O32, JUMP_O16, JUMP_O32, JUMP_O8, JZ_O16, JZ_O32, JZ_O8, LAHF, LAR_O16, LAR_O32, LEAVE_O16_A16, LEAVE_O16_A32, LEAVE_O32_A16, LEAVE_O32_A32, LGDT_O16, LGDT_O32, LIDT_O16, LIDT_O32, LLDT, LMSW, LOAD_SEG_CS, LOAD_SEG_DS, LOAD_SEG_ES, LOAD_SEG_FS, LOAD_SEG_GS, LOAD_SEG_SS, LOAD0_ADDR, LOAD0_AH, LOAD0_AL, LOAD0_AX, LOAD0_BH, LOAD0_BL, LOAD0_BP, LOAD0_BX, LOAD0_CH, LOAD0_CL, LOAD0_CR0, LOAD0_CR2, LOAD0_CR3, LOAD0_CR4, LOAD0_CS, LOAD0_CX, LOAD0_DH, LOAD0_DI, LOAD0_DL, LOAD0_DR0, LOAD0_DR1, LOAD0_DR2, LOAD0_DR3, LOAD0_DR6, LOAD0_DR7, LOAD0_DS, LOAD0_DX, LOAD0_EAX, LOAD0_EBP, LOAD0_EBX, LOAD0_ECX, LOAD0_EDI, LOAD0_EDX, LOAD0_EFLAGS, LOAD0_ES, LOAD0_ESI, LOAD0_ESP, LOAD0_FLAGS, LOAD0_FPUCW, LOAD0_FPUSW, LOAD0_FS, LOAD0_GS, LOAD0_IB, LOAD0_ID, LOAD0_IW, LOAD0_MEM_BYTE, LOAD0_MEM_DWORD, LOAD0_MEM_QWORD, LOAD0_MEM_WORD, LOAD0_SI, LOAD0_SP, LOAD0_SS, LOAD1_AH, LOAD1_AL, LOAD1_AX, LOAD1_BH, LOAD1_BL, LOAD1_BP, LOAD1_BX, LOAD1_CH, LOAD1_CL, LOAD1_CX, LOAD1_DH, LOAD1_DI, LOAD1_DL, LOAD1_DX, LOAD1_EAX, LOAD1_EBP, LOAD1_EBX, LOAD1_ECX, LOAD1_EDI, LOAD1_EDX, LOAD1_ESI, LOAD1_ESP, LOAD1_IB, LOAD1_ID, LOAD1_IW, LOAD1_MEM_BYTE, LOAD1_MEM_DWORD, LOAD1_MEM_WORD, LOAD1_SI, LOAD1_SP, LOAD2_AL, LOAD2_AX, LOAD2_CL, LOAD2_EAX, LOAD2_IB, LODSB_A16, LODSB_A32, LODSD_A16, LODSD_A32, LODSW_A16, LODSW_A32, LOOP_CX, LOOP_ECX, LOOPNZ_CX, LOOPNZ_ECX, LOOPZ_CX, LOOPZ_ECX, LSL_O16, LSL_O32, LTR, MEM_RESET, MICROCODE_LIMIT, MOVSB_A16, MOVSB_A32, MOVSD_A16, MOVSD_A32, MOVSW_A16, MOVSW_A32, MUL_O16, MUL_O32, MUL_O8, NEG, NEG_O16_FLAGS, NEG_O32_FLAGS, NEG_O8_FLAGS, NOOP, NOT, OR, OUT_O16, OUT_O32, OUT_O8, OUTSB_A16, OUTSB_A32, OUTSD_A16, OUTSD_A32, OUTSW_A16, OUTSW_A32, POP_O16_A16, POP_O16_A32, POP_O32_A16, POP_O32_A32, POPA_A16, POPA_A32, POPAD_A16, POPAD_A32, POPF_O16_A16, POPF_O16_A32, POPF_O32_A16, POPF_O32_A32, PUSH_O16_A16, PUSH_O16_A32, PUSH_O32_A16, PUSH_O32_A32, PUSHA_A16, PUSHA_A32, PUSHAD_A16, PUSHAD_A32, PUSHF_O16_A16, PUSHF_O16_A32, PUSHF_O32_A16, PUSHF_O32_A32, RCL_O16, RCL_O16_FLAGS, RCL_O32, RCL_O32_FLAGS, RCL_O8, RCL_O8_FLAGS, RCR_O16, RCR_O16_FLAGS, RCR_O32, RCR_O32_FLAGS, RCR_O8, RCR_O8_FLAGS, RDMSR, RDTSC, REP_INSB_A16, REP_INSB_A32, REP_INSD_A16, REP_INSD_A32, REP_INSW_A16, REP_INSW_A32, REP_LODSB_A16, REP_LODSB_A32, REP_LODSD_A16, REP_LODSD_A32, REP_LODSW_A16, REP_LODSW_A32, REP_MOVSB_A16, REP_MOVSB_A32, REP_MOVSD_A16, REP_MOVSD_A32, REP_MOVSW_A16, REP_MOVSW_A32, REP_OUTSB_A16, REP_OUTSB_A32, REP_OUTSD_A16, REP_OUTSD_A32, REP_OUTSW_A16, REP_OUTSW_A32, REP_STOSB_A16, REP_STOSB_A32, REP_STOSD_A16, REP_STOSD_A32, REP_STOSW_A16, REP_STOSW_A32, REP_SUB_O16_FLAGS, REP_SUB_O32_FLAGS, REP_SUB_O8_FLAGS, REPE_CMPSB_A16, REPE_CMPSB_A32, REPE_CMPSD_A16, REPE_CMPSD_A32, REPE_CMPSW_A16, REPE_CMPSW_A32, REPE_SCASB_A16, REPE_SCASB_A32, REPE_SCASD_A16, REPE_SCASD_A32, REPE_SCASW_A16, REPE_SCASW_A32, REPNE_CMPSB_A16, REPNE_CMPSB_A32, REPNE_CMPSD_A16, REPNE_CMPSD_A32, REPNE_CMPSW_A16, REPNE_CMPSW_A32, REPNE_SCASB_A16, REPNE_SCASB_A32, REPNE_SCASD_A16, REPNE_SCASD_A32, REPNE_SCASW_A16, REPNE_SCASW_A32, RET_FAR_IW_O16_A16, RET_FAR_IW_O16_A32, RET_FAR_IW_O32_A16, RET_FAR_IW_O32_A32, RET_FAR_O16_A16, RET_FAR_O16_A32, RET_FAR_O32_A16, RET_FAR_O32_A32, RET_IW_O16_A16, RET_IW_O16_A32, RET_IW_O32_A16, RET_IW_O32_A32, RET_O16_A16, RET_O16_A32, RET_O32_A16, RET_O32_A32, ROL_O16, ROL_O16_FLAGS, ROL_O32, ROL_O32_FLAGS, ROL_O8, ROL_O8_FLAGS, ROR_O16, ROR_O16_FLAGS, ROR_O32, ROR_O32_FLAGS, ROR_O8, ROR_O8_FLAGS, SAHF, SAR_O16, SAR_O16_FLAGS, SAR_O32, SAR_O32_FLAGS, SAR_O8, SAR_O8_FLAGS, SBB, SBB_O16_FLAGS, SBB_O32_FLAGS, SBB_O8_FLAGS, SCASB_A16, SCASB_A32, SCASD_A16, SCASD_A32, SCASW_A16, SCASW_A32, SETA, SETC, SETG, SETL, SETNA, SETNC, SETNG, SETNL, SETNO, SETNP, SETNS, SETNZ, SETO, SETP, SETS, SETZ, SGDT_O16, SGDT_O32, SHL, SHL_O16_FLAGS, SHL_O32_FLAGS, SHL_O8_FLAGS, SHLD_O16, SHLD_O32, SHR, SHR_O16_FLAGS, SHR_O32_FLAGS, SHR_O8_FLAGS, SHRD_O16, SHRD_O32, SIDT_O16, SIDT_O32, SIGN_EXTEND_16_32, SIGN_EXTEND_8_16, SIGN_EXTEND_8_32, SLDT, SMSW, STC, STD, STI, STORE0_AH, STORE0_AL, STORE0_AX, STORE0_BH, STORE0_BL, STORE0_BP, STORE0_BX, STORE0_CH, STORE0_CL, STORE0_CR0, STORE0_CR2, STORE0_CR3, STORE0_CR4, STORE0_CS, STORE0_CX, STORE0_DH, STORE0_DI, STORE0_DL, STORE0_DR0, STORE0_DR1, STORE0_DR2, STORE0_DR3, STORE0_DR6, STORE0_DR7, STORE0_DS, STORE0_DX, STORE0_EAX, STORE0_EBP, STORE0_EBX, STORE0_ECX, STORE0_EDI, STORE0_EDX, STORE0_EFLAGS, STORE0_ES, STORE0_ESI, STORE0_ESP, STORE0_FLAGS, STORE0_FPUCW, STORE0_FPUSW, STORE0_FS, STORE0_GS, STORE0_MEM_BYTE, STORE0_MEM_DWORD, STORE0_MEM_QWORD, STORE0_MEM_WORD, STORE0_SI, STORE0_SP, STORE0_SS, STORE1_AH, STORE1_AL, STORE1_AX, STORE1_BH, STORE1_BL, STORE1_BP, STORE1_BX, STORE1_CH, STORE1_CL, STORE1_CS, STORE1_CX, STORE1_DH, STORE1_DI, STORE1_DL, STORE1_DS, STORE1_DX, STORE1_EAX, STORE1_EBP, STORE1_EBX, STORE1_ECX, STORE1_EDI, STORE1_EDX, STORE1_ES, STORE1_ESI, STORE1_ESP, STORE1_FS, STORE1_GS, STORE1_MEM_BYTE, STORE1_MEM_DWORD, STORE1_MEM_WORD, STORE1_SI, STORE1_SP, STORE1_SS, STOSB_A16, STOSB_A32, STOSD_A16, STOSD_A32, STOSW_A16, STOSW_A32, STR, SUB, SUB_O16_FLAGS, SUB_O32_FLAGS, SUB_O8_FLAGS, SYSENTER, SYSEXIT, UNDEFINED, VERR, VERW, WRMSR, XOR
 
Constructor Summary
ProtectedModeUBlock()
           
ProtectedModeUBlock(int[] microcodes, int[] x86lengths)
           
 
Method Summary
 int execute(Processor cpu)
          Returns the number of equivalent x86 instructions executed.
 InstructionSource getAsInstructionSource()
           
 java.lang.String getDisplayString()
           
 int[] getMicrocodes()
           
 int getX86Count()
           
 int getX86Length()
           
 boolean handleMemoryRegionChange(int startAddress, int endAddress)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

microcodes

protected int[] microcodes

cumulativeX86Length

protected int[] cumulativeX86Length
Constructor Detail

ProtectedModeUBlock

public ProtectedModeUBlock()

ProtectedModeUBlock

public ProtectedModeUBlock(int[] microcodes,
                           int[] x86lengths)
Parameters:
microcodes -
x86lengths -
Method Detail

getX86Length

public int getX86Length()
Specified by:
getX86Length in interface CodeBlock
Returns:
-

getX86Count

public int getX86Count()
Specified by:
getX86Count in interface CodeBlock
Returns:
-

handleMemoryRegionChange

public boolean handleMemoryRegionChange(int startAddress,
                                        int endAddress)
Specified by:
handleMemoryRegionChange in interface CodeBlock
Parameters:
startAddress -
endAddress -
Returns:
-

getDisplayString

public java.lang.String getDisplayString()
Specified by:
getDisplayString in interface CodeBlock
Returns:
-

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getAsInstructionSource

public InstructionSource getAsInstructionSource()
Returns:
-

getMicrocodes

public int[] getMicrocodes()
Returns:
-

execute

public int execute(Processor cpu)
Description copied from interface: CodeBlock
Returns the number of equivalent x86 instructions executed. Negative results indicate an error

Specified by:
execute in interface CodeBlock
Returns:
the number of equivalent x86 instructions executed. Negative results indicate an error