Definition at line 8 of file cstool_arm.c.
12 cs_regs regs_read, regs_write;
13 uint8_t regs_read_count, regs_write_count;
16 if (ins->detail ==
NULL)
19 arm = &(ins->detail->arm);
22 printf(
"\top_count: %u\n",
arm->op_count);
24 for (
i = 0;
i <
arm->op_count;
i++) {
26 switch((
int)
op->type) {
33 printf(
"\t\toperands[%u].type: IMM = 0x%x\n",
i,
op->imm);
36 #if defined(_KERNEL_MODE)
38 printf(
"\t\toperands[%u].type: FP = <float_point_unsupported>\n",
i);
40 printf(
"\t\toperands[%u].type: FP = %f\n",
i,
op->fp);
44 printf(
"\t\toperands[%u].type: MEM\n",
i);
46 printf(
"\t\t\toperands[%u].mem.base: REG = %s\n",
49 printf(
"\t\t\toperands[%u].mem.index: REG = %s\n",
51 if (
op->mem.scale != 1)
52 printf(
"\t\t\toperands[%u].mem.scale: %d\n",
i,
op->mem.scale);
53 if (
op->mem.disp != 0)
54 printf(
"\t\t\toperands[%u].mem.disp: 0x%x\n",
i,
op->mem.disp);
55 if (
op->mem.lshift != 0)
56 printf(
"\t\t\toperands[%u].mem.lshift: 0x%x\n",
i,
op->mem.lshift);
60 printf(
"\t\toperands[%u].type: P-IMM = %u\n",
i,
op->imm);
63 printf(
"\t\toperands[%u].type: C-IMM = %u\n",
i,
op->imm);
69 printf(
"\t\toperands[%u].type: SYSREG = %u\n",
i,
op->reg);
73 if (
op->neon_lane != -1) {
74 printf(
"\t\toperands[%u].neon_lane = %u\n",
i,
op->neon_lane);
81 printf(
"\t\toperands[%u].access: READ\n",
i);
84 printf(
"\t\toperands[%u].access: WRITE\n",
i);
87 printf(
"\t\toperands[%u].access: READ | WRITE\n",
i);
94 printf(
"\t\t\tShift: %u = %u\n",
op->shift.type,
op->shift.value);
97 printf(
"\t\t\tShift: %u = %s\n",
op->shift.type,
101 if (
op->vector_index != -1) {
102 printf(
"\t\toperands[%u].vector_index = %u\n",
i,
op->vector_index);
106 printf(
"\t\tSubtracted: True\n");
110 printf(
"\tCode condition: %u\n",
arm->cc);
112 if (
arm->update_flags)
113 printf(
"\tUpdate-flags: True\n");
116 printf(
"\tWrite-back: True\n");
119 printf(
"\tCPSI-mode: %u\n",
arm->cps_mode);
122 printf(
"\tCPSI-flag: %u\n",
arm->cps_flag);
124 if (
arm->vector_data)
125 printf(
"\tVector-data: %u\n",
arm->vector_data);
127 if (
arm->vector_size)
128 printf(
"\tVector-size: %u\n",
arm->vector_size);
131 printf(
"\tUser-mode: True\n");
133 if (
arm->mem_barrier)
134 printf(
"\tMemory-barrier: %u\n",
arm->mem_barrier);
138 regs_read, ®s_read_count,
139 regs_write, ®s_write_count)) {
140 if (regs_read_count) {
141 printf(
"\tRegisters read:");
142 for(
i = 0;
i < regs_read_count;
i++) {
148 if (regs_write_count) {
149 printf(
"\tRegisters modified:");
150 for(
i = 0;
i < regs_write_count;
i++) {
static mcore_handle handle
@ ARM_SFT_ASR_REG
shift with register
@ ARM_SETEND_BE
BE operand.
@ ARM_OP_IMM
= CS_OP_IMM (Immediate operand).
@ ARM_OP_REG
= CS_OP_REG (Register operand).
@ ARM_OP_CIMM
C-Immediate (coprocessor registers)
@ ARM_OP_SETEND
operand for SETEND instruction
@ ARM_OP_PIMM
P-Immediate (coprocessor registers)
@ ARM_OP_MEM
= CS_OP_MEM (Memory operand).
@ ARM_OP_FP
= CS_OP_FP (Floating-Point operand).
@ ARM_OP_SYSREG
MSR/MRS special register operand.
@ ARM_CC_AL
Always (unconditional) Always (unconditional)
@ CS_AC_READ
Operand read from memory or register.
@ CS_AC_WRITE
Operand write to memory or register.
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_regs_access(csh ud, const cs_insn *insn, cs_regs regs_read, uint8_t *regs_read_count, cs_regs regs_write, uint8_t *regs_write_count)
CAPSTONE_EXPORT const char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
References ARM_CC_AL, ARM_CC_INVALID, ARM_OP_CIMM, ARM_OP_FP, ARM_OP_IMM, ARM_OP_MEM, ARM_OP_PIMM, ARM_OP_REG, ARM_OP_SETEND, ARM_OP_SYSREG, ARM_REG_INVALID, ARM_SETEND_BE, ARM_SFT_ASR_REG, ARM_SFT_INVALID, CS_AC_READ, CS_AC_WRITE, cs_reg_name(), cs_regs_access(), handle, i, NULL, and printf().
Referenced by print_details().