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}
23
24type arm_op_value =
25	| ARM_OP_INVALID of int
26	| ARM_OP_REG of int
27	| ARM_OP_CIMM of int
28	| ARM_OP_PIMM of int
29	| ARM_OP_IMM of int
30	| ARM_OP_FP of float
31	| ARM_OP_MEM of arm_op_mem
32	| ARM_OP_SETEND of int
33
34type arm_op = {
35	vector_index: int;
36	shift: arm_op_shift;
37	value: arm_op_value;
38	subtracted: bool;
39}
40
41type cs_arm = {
42	usermode: bool;
43	vector_size: int;
44	vector_data: int;
45	cps_mode: int;
46	cps_flag: int;
47	cc: int;
48	update_flags: bool;
49	writeback: bool;
50	mem_barrier: int;
51	operands: arm_op array;
52}
53