Mercurial > repos > blastem
comparison 68kinst.h @ 630:47123183c336
Improve support for disassembling 68010+ binaries
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 08 Oct 2014 22:18:34 -0700 |
parents | 775802dab98f |
children | 4a6ec64acd79 |
comparison
equal
deleted
inserted
replaced
629:9089951a1994 | 630:47123183c336 |
---|---|
5 */ | 5 */ |
6 #ifndef M68KINST_H_ | 6 #ifndef M68KINST_H_ |
7 #define M68KINST_H_ | 7 #define M68KINST_H_ |
8 | 8 |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | |
11 #ifdef M68030 | |
12 #define M68020 | |
13 #endif | |
14 #ifdef M68020 | |
15 #define M68010 | |
16 #endif | |
10 | 17 |
11 typedef enum { | 18 typedef enum { |
12 BIT_MOVEP_IMMED = 0, | 19 BIT_MOVEP_IMMED = 0, |
13 MOVE_BYTE, | 20 MOVE_BYTE, |
14 MOVE_LONG, | 21 MOVE_LONG, |
95 M68K_TAS, | 102 M68K_TAS, |
96 M68K_TRAP, | 103 M68K_TRAP, |
97 M68K_TRAPV, | 104 M68K_TRAPV, |
98 M68K_TST, | 105 M68K_TST, |
99 M68K_UNLK, | 106 M68K_UNLK, |
100 M68K_INVALID | 107 M68K_INVALID, |
108 #ifdef M68010 | |
109 M68K_BKPT, | |
110 M68K_MOVE_FROM_CCR, | |
111 M68K_MOVEC, | |
112 M68K_MOVES, | |
113 M68K_RTD, | |
114 #endif | |
115 #ifdef M68020 | |
116 M68K_BFCHG, | |
117 M68K_BFCLR, | |
118 M68K_BFEXTS, | |
119 M68K_BFEXTU, | |
120 M68K_BFFFO, | |
121 M68K_BFINS, | |
122 M68K_BFSET, | |
123 M68K_BFTST, | |
124 M68K_CALLM, | |
125 M68K_CAS, | |
126 M68K_CAS2, | |
127 M68K_CHK2, | |
128 M68K_CMP2, | |
129 M68K_CP_BCC, | |
130 M68K_CP_DBCC, | |
131 M68K_CP_GEN, | |
132 M68K_CP_RESTORE, | |
133 M68K_CP_SAVE, | |
134 M68K_CP_SCC, | |
135 M68K_CP_TRAPCC, | |
136 M68K_DIVSL, | |
137 M68K_DIVUL, | |
138 M68K_EXTB, | |
139 M68K_PACK, | |
140 M68K_RTM, | |
141 M68K_TRAPCC, | |
142 M68K_UNPK, | |
143 #endif | |
101 } m68K_op; | 144 } m68K_op; |
102 | 145 |
103 typedef enum { | 146 typedef enum { |
104 VAR_NORMAL, | 147 VAR_NORMAL, |
105 VAR_QUICK, | 148 VAR_QUICK, |
160 COND_GREATER_EQ, | 203 COND_GREATER_EQ, |
161 COND_LESS, | 204 COND_LESS, |
162 COND_GREATER, | 205 COND_GREATER, |
163 COND_LESS_EQ | 206 COND_LESS_EQ |
164 } m68K_condition; | 207 } m68K_condition; |
208 | |
209 #ifdef M68010 | |
210 typedef enum { | |
211 CR_SFC, | |
212 CR_DFC, | |
213 #ifdef M68020 | |
214 CR_CACR, | |
215 #endif | |
216 CR_USP, | |
217 CR_VBR, | |
218 #ifdef M68020 | |
219 CR_CAAR, | |
220 CR_MSP, | |
221 CR_ISP | |
222 #endif | |
223 } m68k_control_reg; | |
224 | |
225 #ifdef M68020 | |
226 #define MAX_HIGH_CR 0x804 | |
227 #define MAX_LOW_CR 0x002 | |
228 #else | |
229 #define MAX_HIGH_CR 0x801 | |
230 #define MAX_LOW_CR 0x001 | |
231 #endif | |
232 | |
233 #endif | |
165 | 234 |
166 typedef struct { | 235 typedef struct { |
167 uint8_t addr_mode; | 236 uint8_t addr_mode; |
168 union { | 237 union { |
169 struct { | 238 struct { |