1(* Capstone Disassembly Engine 2 * By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 *) 3 4open Arm_const 5 6let _CS_OP_ARCH = 5;; 7let _CS_OP_CIMM = _CS_OP_ARCH (* C-Immediate *) 8let _CS_OP_PIMM = _CS_OP_ARCH + 1 (* P-Immediate *) 9 10 11(* architecture specific info of instruction *) 12type arm_op_shift = { 13 shift_type: int; (* TODO: covert this to pattern like arm_op_value? *) 14 shift_value: int; 15} 16 17type arm_op_mem = { 18 base: int; 19 index: int; 20 scale: int; 21 disp: int; 22 lshift: int; 23} 24 25type arm_op_value = 26 | ARM_OP_INVALID of int 27 | ARM_OP_REG of int 28 | ARM_OP_CIMM of int 29 | ARM_OP_PIMM of int 30 | ARM_OP_IMM of int 31 | ARM_OP_FP of float 32 | ARM_OP_MEM of arm_op_mem 33 | ARM_OP_SETEND of int 34 35type arm_op = { 36 vector_index: int; 37 shift: arm_op_shift; 38 value: arm_op_value; 39 subtracted: bool; 40 access: int; 41 neon_lane: int; 42} 43 44type cs_arm = { 45 usermode: bool; 46 vector_size: int; 47 vector_data: int; 48 cps_mode: int; 49 cps_flag: int; 50 cc: int; 51 update_flags: bool; 52 writeback: bool; 53 mem_barrier: int; 54 operands: arm_op array; 55} 56