• Home
  • Raw
  • Download

Lines Matching refs:insn

22 def print_insn_detail(mode, insn):  argument
30 print("0x%x:\t%s\t%s" % (insn.address, insn.mnemonic, insn.op_str))
33 if insn.id == 0:
37 print_string_hex("\tPrefix:", insn.prefix)
40 print_string_hex("\tOpcode:", insn.opcode)
43 print("\trex: 0x%x" % (insn.rex))
46 print("\taddr_size: %u" % (insn.addr_size))
49 print("\tmodrm: 0x%x" % (insn.modrm))
52 print("\tdisp: 0x%s" % to_x_32(insn.disp))
57 print("\tsib: 0x%x" % (insn.sib))
58 if (insn.sib):
59 if insn.sib_base != 0:
60 print("\t\tsib_base: %s" % (insn.reg_name(insn.sib_base)))
61 if insn.sib_index != 0:
62 print("\t\tsib_index: %s" % (insn.reg_name(insn.sib_index)))
63 if insn.sib_scale != 0:
64 print("\t\tsib_scale: %d" % (insn.sib_scale))
67 if insn.sse_cc != X86_SSE_CC_INVALID:
68 print("\tsse_cc: %u" % (insn.sse_cc))
71 if insn.avx_cc != X86_AVX_CC_INVALID:
72 print("\tavx_cc: %u" % (insn.avx_cc))
75 if insn.avx_sae:
79 if insn.avx_rm != X86_AVX_RM_INVALID:
80 print("\tavx_rm: %u" % (insn.avx_rm))
82 count = insn.op_count(X86_OP_IMM)
86 op = insn.op_find(X86_OP_IMM, i + 1)
89 if len(insn.operands) > 0:
90 print("\top_count: %u" % len(insn.operands))
92 for i in insn.operands:
95 print("\t\toperands[%u].type: REG = %s" % (c, insn.reg_name(i.reg)))
103 … print("\t\t\toperands[%u].mem.segment: REG = %s" % (c, insn.reg_name(i.mem.segment)))
105 print("\t\t\toperands[%u].mem.base: REG = %s" % (c, insn.reg_name(i.mem.base)))
107 … print("\t\t\toperands[%u].mem.index: REG = %s" % (c, insn.reg_name(i.mem.index)))
140 for insn in md.disasm(code, 0x1000):
141 print_insn_detail(mode, insn)
143 print ("0x%x:\n" % (insn.address + insn.size))