annotate udis86-1.4/libudis86/types.h @ 5:496dfd8f7342 default tip

added: -repeat option for "in", "ov" -run until a line option -run until a function option -break on a function start -n is an alias for ov
author marton@basel.hu
date Sun, 17 Apr 2011 11:05:31 +0200
parents 4a9dcbd9e54f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
1 /* -----------------------------------------------------------------------------
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
2 * types.h
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
3 *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
4 * Copyright (c) 2006, Vivek Mohan <vivek@sig9.com>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
5 * All rights reserved. See LICENSE
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
6 * -----------------------------------------------------------------------------
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
7 */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
8 #ifndef UD_TYPES_H
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
9 #define UD_TYPES_H
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
10
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
11 #include <stdio.h>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
12
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
13 #ifdef _MSC_VER
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
14 # define FMT64 "%I64"
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
15 typedef unsigned __int8 uint8_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
16 typedef unsigned __int16 uint16_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
17 typedef unsigned __int32 uint32_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
18 typedef unsigned __int64 uint64_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
19 typedef __int8 int8_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
20 typedef __int16 int16_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
21 typedef __int32 int32_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
22 typedef __int64 int64_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
23 #else
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
24 # define FMT64 "%ll"
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
25 # include <inttypes.h>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
26 #endif
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
27
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
28 #include "mnemonics.h"
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
29
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
30 /* -----------------------------------------------------------------------------
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
31 * All possible "types" of objects in udis86. Order is Important!
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
32 * -----------------------------------------------------------------------------
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
33 */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
34 enum ud_type
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
35 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
36 UD_NONE,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
37
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
38 /* 8 bit GPRs */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
39 UD_R_AL, UD_R_CL, UD_R_DL, UD_R_BL,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
40 UD_R_AH, UD_R_CH, UD_R_DH, UD_R_BH,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
41 UD_R_SPL, UD_R_BPL, UD_R_SIL, UD_R_DIL,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
42 UD_R_R8B, UD_R_R9B, UD_R_R10B, UD_R_R11B,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
43 UD_R_R12B, UD_R_R13B, UD_R_R14B, UD_R_R15B,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
44
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
45 /* 16 bit GPRs */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
46 UD_R_AX, UD_R_CX, UD_R_DX, UD_R_BX,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
47 UD_R_SP, UD_R_BP, UD_R_SI, UD_R_DI,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
48 UD_R_R8W, UD_R_R9W, UD_R_R10W, UD_R_R11W,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
49 UD_R_R12W, UD_R_R13W, UD_R_R14W, UD_R_R15W,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
50
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
51 /* 32 bit GPRs */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
52 UD_R_EAX, UD_R_ECX, UD_R_EDX, UD_R_EBX,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
53 UD_R_ESP, UD_R_EBP, UD_R_ESI, UD_R_EDI,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
54 UD_R_R8D, UD_R_R9D, UD_R_R10D, UD_R_R11D,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
55 UD_R_R12D, UD_R_R13D, UD_R_R14D, UD_R_R15D,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
56
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
57 /* 64 bit GPRs */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
58 UD_R_RAX, UD_R_RCX, UD_R_RDX, UD_R_RBX,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
59 UD_R_RSP, UD_R_RBP, UD_R_RSI, UD_R_RDI,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
60 UD_R_R8, UD_R_R9, UD_R_R10, UD_R_R11,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
61 UD_R_R12, UD_R_R13, UD_R_R14, UD_R_R15,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
62
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
63 /* segment registers */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
64 UD_R_ES, UD_R_CS, UD_R_SS, UD_R_DS,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
65 UD_R_FS, UD_R_GS,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
66
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
67 /* control registers*/
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
68 UD_R_CR0, UD_R_CR1, UD_R_CR2, UD_R_CR3,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
69 UD_R_CR4, UD_R_CR5, UD_R_CR6, UD_R_CR7,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
70 UD_R_CR8, UD_R_CR9, UD_R_CR10, UD_R_CR11,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
71 UD_R_CR12, UD_R_CR13, UD_R_CR14, UD_R_CR15,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
72
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
73 /* debug registers */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
74 UD_R_DR0, UD_R_DR1, UD_R_DR2, UD_R_DR3,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
75 UD_R_DR4, UD_R_DR5, UD_R_DR6, UD_R_DR7,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
76 UD_R_DR8, UD_R_DR9, UD_R_DR10, UD_R_DR11,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
77 UD_R_DR12, UD_R_DR13, UD_R_DR14, UD_R_DR15,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
78
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
79 /* mmx registers */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
80 UD_R_MM0, UD_R_MM1, UD_R_MM2, UD_R_MM3,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
81 UD_R_MM4, UD_R_MM5, UD_R_MM6, UD_R_MM7,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
82
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
83 /* x87 registers */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
84 UD_R_ST0, UD_R_ST1, UD_R_ST2, UD_R_ST3,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
85 UD_R_ST4, UD_R_ST5, UD_R_ST6, UD_R_ST7,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
86
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
87 /* extended multimedia registers */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
88 UD_R_XMM0, UD_R_XMM1, UD_R_XMM2, UD_R_XMM3,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
89 UD_R_XMM4, UD_R_XMM5, UD_R_XMM6, UD_R_XMM7,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
90 UD_R_XMM8, UD_R_XMM9, UD_R_XMM10, UD_R_XMM11,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
91 UD_R_XMM12, UD_R_XMM13, UD_R_XMM14, UD_R_XMM15,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
92
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
93 UD_R_RIP,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
94
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
95 /* Operand Types */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
96 UD_OP_REG, UD_OP_MEM, UD_OP_PTR, UD_OP_IMM,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
97 UD_OP_JIMM, UD_OP_CONST
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
98 };
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
99
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
100 /* -----------------------------------------------------------------------------
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
101 * struct ud_operand - Disassembled instruction Operand.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
102 * -----------------------------------------------------------------------------
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
103 */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
104 struct ud_operand
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
105 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
106 enum ud_type type;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
107 uint8_t size;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
108 union {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
109 int8_t sbyte;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
110 uint8_t ubyte;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
111 int16_t sword;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
112 uint16_t uword;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
113 int32_t sdword;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
114 uint32_t udword;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
115 int64_t sqword;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
116 uint64_t uqword;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
117
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
118 struct {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
119 uint16_t seg;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
120 uint32_t off;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
121 } ptr;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
122 } lval;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
123
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
124 enum ud_type base;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
125 enum ud_type index;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
126 uint8_t offset;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
127 uint8_t scale;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
128 };
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
129
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
130 /* -----------------------------------------------------------------------------
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
131 * struct ud - The udis86 object.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
132 * -----------------------------------------------------------------------------
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
133 */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
134 struct ud
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
135 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
136 int (*inp_hook) (struct ud*);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
137 uint8_t inp_curr;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
138 uint8_t inp_fill;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
139 FILE* inp_file;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
140 uint8_t inp_ctr;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
141 uint8_t* inp_buff;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
142 uint8_t* inp_buff_end;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
143 uint8_t inp_end;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
144 void (*translator)(struct ud*);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
145 uint64_t insn_offset;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
146 char insn_hexcode[32];
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
147 char insn_buffer[64];
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
148 unsigned int insn_fill;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
149 uint8_t dis_mode;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
150 uint64_t pc;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
151 uint8_t vendor;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
152 struct map_entry* mapen;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
153 enum ud_mnemonic_code mnemonic;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
154 struct ud_operand operand[3];
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
155 uint8_t error;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
156 uint8_t pfx_rex;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
157 uint8_t pfx_seg;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
158 uint8_t pfx_opr;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
159 uint8_t pfx_adr;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
160 uint8_t pfx_lock;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
161 uint8_t pfx_rep;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
162 uint8_t pfx_repe;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
163 uint8_t pfx_repne;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
164 uint8_t pfx_insn;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
165 uint8_t default64;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
166 uint8_t opr_mode;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
167 uint8_t adr_mode;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
168 uint8_t br_far;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
169 uint8_t br_near;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
170 uint8_t c1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
171 uint8_t c2;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
172 uint8_t c3;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
173 uint8_t inp_cache[256];
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
174 uint8_t inp_sess[64];
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
175
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
176 };
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
177
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
178 /* -----------------------------------------------------------------------------
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
179 * Type-definitions
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
180 * -----------------------------------------------------------------------------
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
181 */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
182 typedef enum ud_type ud_type_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
183 typedef enum ud_mnemonic_code ud_mnemonic_code_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
184
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
185 typedef struct ud ud_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
186 typedef struct ud_operand ud_operand_t;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
187
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
188 #define UD_SYN_INTEL ud_translate_intel
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
189 #define UD_SYN_ATT ud_translate_att
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
190 #define UD_EOI -1
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
191 #define UD_INP_CACHE_SZ 32
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
192 #define UD_VENDOR_AMD 0
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
193 #define UD_VENDOR_INTEL 1
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
194 #endif