55 if len(insn.operands) > 0:
56 print(
"\top_count: %u" % (
len(insn.operands)))
57 print(
"\tgroups_count: %u" %
len(insn.groups))
61 for i, op
in enumerate(insn.operands):
62 if op.type == M68K_OP_REG:
63 print(
"\t\toperands[%u].type: REG = %s" % (i, insn.reg_name(op.reg)))
64 elif op.type == M68K_OP_IMM:
65 print(
"\t\toperands[%u].type: IMM = 0x%x" % (i, op.imm & 0xffffffff))
66 elif op.type == M68K_OP_MEM:
67 print(
"\t\toperands[%u].type: MEM" % (i))
68 if op.mem.base_reg != M68K_REG_INVALID:
69 print(
"\t\t\toperands[%u].mem.base: REG = %s" % (i, insn.reg_name(op.mem.base_reg)))
70 if op.mem.index_reg != M68K_REG_INVALID:
71 print(
"\t\t\toperands[%u].mem.index: REG = %s" % (i, insn.reg_name(op.mem.index_reg)))
73 if op.mem.index_size > 0:
75 print(
"\t\t\toperands[%u].mem.index: size = %s" % (i, mem_index_str))
77 print(
"\t\t\toperands[%u].mem.disp: 0x%x" % (i, op.mem.disp))
79 print(
"\t\t\toperands[%u].mem.scale: %d" % (i, op.mem.scale))
80 print(
"\t\taddress mode: %s" % (s_addressing_modes[op.address_mode]))
81 elif op.type == M68K_OP_FP_SINGLE:
82 print(
"\t\toperands[%u].type: FP_SINGLE" % i)
83 print(
"\t\toperands[%u].simm: %f", i, op.simm)
84 elif op.type == M68K_OP_FP_DOUBLE:
85 print(
"\t\toperands[%u].type: FP_DOUBLE" % i)
86 print(
"\t\toperands[%u].dimm: %lf", i, op.dimm)
87 elif op.type == M68K_OP_BR_DISP:
88 print(
"\t\toperands[%u].br_disp.disp: 0x%x" % (i, op.br_disp.disp))
89 print(
"\t\toperands[%u].br_disp.disp_size: %d" % (i, op.br_disp.disp_size))
def print_insn_detail(insn)