comparison lwasm/instab.c @ 0:2c24602be78f

Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
author lost@l-w.ca
date Wed, 19 Jan 2011 22:27:17 -0700
parents
children bad2ee25acdd
comparison
equal deleted inserted replaced
-1:000000000000 0:2c24602be78f
1 /*
2 instab.c
3 Copyright © 2008 William Astle
4
5 This file is part of LWASM.
6
7 LWASM is free software: you can redistribute it and/or modify it under the
8 terms of the GNU General Public License as published by the Free Software
9 Foundation, either version 3 of the License, or (at your option) any later
10 version.
11
12 This program is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 more details.
16
17 You should have received a copy of the GNU General Public License along with
18 this program. If not, see <http://www.gnu.org/licenses/>.
19
20
21 Contains the instruction table for assembling code
22 */
23 #include <stdlib.h>
24 #define __instab_c_seen__
25 #include "instab.h"
26
27 // inherent
28 extern PARSEFUNC(insn_parse_inh);
29 #define insn_resolve_inh NULL
30 extern EMITFUNC(insn_emit_inh);
31
32 // register to register
33 extern PARSEFUNC(insn_parse_rtor);
34 #define insn_resolve_rtor NULL
35 extern EMITFUNC(insn_emit_rtor);
36
37 // TFM and variants
38 extern PARSEFUNC(insn_parse_tfmrtor);
39 #define insn_resolve_tfmrtor NULL
40 extern EMITFUNC(insn_emit_tfmrtor);
41 extern PARSEFUNC(insn_parse_tfm);
42 #define insn_resolve_tfm NULL
43 extern EMITFUNC(insn_emit_tfm);
44
45 // register list
46 extern PARSEFUNC(insn_parse_rlist);
47 #define insn_resolve_rlist NULL
48 extern EMITFUNC(insn_emit_rlist);
49
50 // indexed
51 extern PARSEFUNC(insn_parse_indexed);
52 extern RESOLVEFUNC(insn_resolve_indexed);
53 extern EMITFUNC(insn_emit_indexed);
54
55 // generic 32 bit immediate
56 extern PARSEFUNC(insn_parse_gen32);
57 extern RESOLVEFUNC(insn_resolve_gen32);
58 extern EMITFUNC(insn_emit_gen32);
59
60 // generic 16 bit immediate
61 extern PARSEFUNC(insn_parse_gen16);
62 extern RESOLVEFUNC(insn_resolve_gen16);
63 extern EMITFUNC(insn_emit_gen16);
64
65 // generic 8 bit immediate
66 extern PARSEFUNC(insn_parse_gen8);
67 extern RESOLVEFUNC(insn_resolve_gen8);
68 extern EMITFUNC(insn_emit_gen8);
69
70 // generic no immediate
71 extern PARSEFUNC(insn_parse_gen0);
72 extern RESOLVEFUNC(insn_resolve_gen0);
73 extern EMITFUNC(insn_emit_gen0);
74
75 // logic memory
76 extern PARSEFUNC(insn_parse_logicmem);
77 extern RESOLVEFUNC(insn_resolve_logicmem);
78 extern EMITFUNC(insn_emit_logicmem);
79
80 // 8 bit immediate only
81 extern PARSEFUNC(insn_parse_imm8);
82 #define insn_resolve_imm8 NULL
83 extern EMITFUNC(insn_emit_imm8);
84
85 // bit to bit ops
86 extern PARSEFUNC(insn_parse_bitbit);
87 #define insn_resolve_bitbit NULL
88 extern EMITFUNC(insn_emit_bitbit);
89
90 // 8 bit relative
91 extern PARSEFUNC(insn_parse_rel8);
92 #define insn_resolve_rel8 NULL
93 extern EMITFUNC(insn_emit_rel8);
94
95 // 16 bit relative
96 extern PARSEFUNC(insn_parse_rel16);
97 #define insn_resolve_rel16 NULL
98 extern EMITFUNC(insn_emit_rel16);
99
100 // MACRO pseudo op
101 extern PARSEFUNC(pseudo_parse_macro);
102 #define pseudo_resolve_macro NULL
103 #define pseudo_emit_macro NULL
104
105 // ENDM pseudo op
106 extern PARSEFUNC(pseudo_parse_endm);
107 #define pseudo_resolve_endm NULL
108 #define pseudo_emit_endm NULL
109
110 #define pseudo_parse_noop NULL
111 #define pseudo_resolve_noop NULL
112 #define pseudo_emit_noop NULL
113
114 extern PARSEFUNC(pseudo_parse_end);
115 #define pseudo_resolve_end NULL
116 extern EMITFUNC(pseudo_emit_end);
117
118 extern PARSEFUNC(pseudo_parse_fcb);
119 #define pseudo_resolve_fcb NULL
120 extern EMITFUNC(pseudo_emit_fcb);
121
122 extern PARSEFUNC(pseudo_parse_fdb);
123 #define pseudo_resolve_fdb NULL
124 extern EMITFUNC(pseudo_emit_fdb);
125
126 extern PARSEFUNC(pseudo_parse_fqb);
127 #define pseudo_resolve_fqb NULL
128 extern EMITFUNC(pseudo_emit_fqb);
129
130 extern PARSEFUNC(pseudo_parse_fcc);
131 #define pseudo_resolve_fcc NULL
132 extern EMITFUNC(pseudo_emit_fcc);
133
134 extern PARSEFUNC(pseudo_parse_fcs);
135 #define pseudo_resolve_fcs NULL
136 extern EMITFUNC(pseudo_emit_fcs);
137
138 extern PARSEFUNC(pseudo_parse_fcn);
139 #define pseudo_resolve_fcn NULL
140 extern EMITFUNC(pseudo_emit_fcn);
141
142 extern PARSEFUNC(pseudo_parse_rmb);
143 extern RESOLVEFUNC(pseudo_resolve_rmb);
144 extern EMITFUNC(pseudo_emit_rmb);
145
146 extern PARSEFUNC(pseudo_parse_rmd);
147 extern RESOLVEFUNC(pseudo_resolve_rmd);
148 extern EMITFUNC(pseudo_emit_rmd);
149
150 extern PARSEFUNC(pseudo_parse_rmq);
151 extern RESOLVEFUNC(pseudo_resolve_rmq);
152 extern EMITFUNC(pseudo_emit_rmq);
153
154 extern PARSEFUNC(pseudo_parse_zmb);
155 extern RESOLVEFUNC(pseudo_resolve_zmb);
156 extern EMITFUNC(pseudo_emit_zmb);
157
158 extern PARSEFUNC(pseudo_parse_zmd);
159 extern RESOLVEFUNC(pseudo_resolve_zmd);
160 extern EMITFUNC(pseudo_emit_zmd);
161
162 extern PARSEFUNC(pseudo_parse_zmq);
163 extern RESOLVEFUNC(pseudo_resolve_zmq);
164 extern EMITFUNC(pseudo_emit_zmq);
165
166 extern PARSEFUNC(pseudo_parse_org);
167 #define pseudo_resolve_org NULL
168 #define pseudo_emit_org NULL
169
170 extern PARSEFUNC(pseudo_parse_equ);
171 #define pseudo_resolve_equ NULL
172 #define pseudo_emit_equ NULL
173
174 extern PARSEFUNC(pseudo_parse_set);
175 #define pseudo_resolve_set NULL
176 #define pseudo_emit_set NULL
177
178 extern PARSEFUNC(pseudo_parse_setdp);
179 #define pseudo_resolve_setdp NULL
180 #define pseudo_emit_setdp NULL
181
182 extern PARSEFUNC(pseudo_parse_ifp1);
183 #define pseudo_resolve_ifp1 NULL
184 #define pseudo_emit_ifp1 NULL
185
186 extern PARSEFUNC(pseudo_parse_ifp2);
187 #define pseudo_resolve_ifp2 NULL
188 #define pseudo_emit_ifp2 NULL
189
190 extern PARSEFUNC(pseudo_parse_ifne);
191 #define pseudo_resolve_ifne NULL
192 #define pseudo_emit_ifne NULL
193
194 extern PARSEFUNC(pseudo_parse_ifeq);
195 #define pseudo_resolve_ifeq NULL
196 #define pseudo_emit_ifeq NULL
197
198 extern PARSEFUNC(pseudo_parse_iflt);
199 #define pseudo_resolve_iflt NULL
200 #define pseudo_emit_iflt NULL
201
202 extern PARSEFUNC(pseudo_parse_ifle);
203 #define pseudo_resolve_ifle NULL
204 #define pseudo_emit_ifle NULL
205
206 extern PARSEFUNC(pseudo_parse_ifgt);
207 #define pseudo_resolve_ifgt NULL
208 #define pseudo_emit_ifgt NULL
209
210 extern PARSEFUNC(pseudo_parse_ifge);
211 #define pseudo_resolve_ifge NULL
212 #define pseudo_emit_ifge NULL
213
214 extern PARSEFUNC(pseudo_parse_ifdef);
215 #define pseudo_resolve_ifdef NULL
216 #define pseudo_emit_ifdef NULL
217
218 extern PARSEFUNC(pseudo_parse_ifndef);
219 #define pseudo_resolve_ifndef NULL
220 #define pseudo_emit_ifndef NULL
221
222 extern PARSEFUNC(pseudo_parse_endc);
223 #define pseudo_resolve_endc NULL
224 #define pseudo_emit_endc NULL
225
226 extern PARSEFUNC(pseudo_parse_else);
227 #define pseudo_resolve_else NULL
228 #define pseudo_emit_else NULL
229
230 extern PARSEFUNC(pseudo_parse_pragma);
231 #define pseudo_resolve_pragma NULL
232 #define pseudo_emit_pragma NULL
233
234 extern PARSEFUNC(pseudo_parse_starpragma);
235 #define pseudo_resolve_starpragma NULL
236 #define pseudo_emit_starpragma NULL
237
238 extern PARSEFUNC(pseudo_parse_section);
239 #define pseudo_resolve_section NULL
240 #define pseudo_emit_section NULL
241
242 extern PARSEFUNC(pseudo_parse_endsection);
243 #define pseudo_resolve_endsection NULL
244 #define pseudo_emit_endsection NULL
245
246 extern PARSEFUNC(pseudo_parse_error);
247 #define pseudo_resolve_error NULL
248 #define pseudo_emit_error NULL
249
250 extern PARSEFUNC(pseudo_parse_warning);
251 #define pseudo_resolve_warning NULL
252 #define pseudo_emit_warning NULL
253
254 extern PARSEFUNC(pseudo_parse_os9);
255 #define pseudo_resolve_os9 NULL
256 extern EMITFUNC(pseudo_emit_os9);
257
258 extern PARSEFUNC(pseudo_parse_mod);
259 #define pseudo_resolve_mod NULL
260 extern EMITFUNC(pseudo_emit_mod);
261
262 extern PARSEFUNC(pseudo_parse_emod);
263 #define pseudo_resolve_emod NULL
264 extern EMITFUNC(pseudo_emit_emod);
265
266 extern PARSEFUNC(pseudo_parse_extdep);
267 #define pseudo_resolve_extdep NULL
268 #define pseudo_emit_extdep NULL
269
270 extern PARSEFUNC(pseudo_parse_extern);
271 #define pseudo_resolve_extern NULL
272 #define pseudo_emit_extern NULL
273
274 extern PARSEFUNC(pseudo_parse_export);
275 #define pseudo_resolve_export NULL
276 #define pseudo_emit_export NULL
277
278 extern PARSEFUNC(pseudo_parse_includebin);
279 #define pseudo_resolve_includebin NULL
280 extern EMITFUNC(pseudo_emit_includebin);
281
282 extern PARSEFUNC(pseudo_parse_include);
283 #define pseudo_resolve_include NULL
284 #define pseudo_emit_include NULL
285
286 extern PARSEFUNC(pseudo_parse_align);
287 extern RESOLVEFUNC(pseudo_resolve_align);
288 extern EMITFUNC(pseudo_emit_align);
289
290 extern PARSEFUNC(pseudo_parse_struct);
291 #define pseudo_resolve_struct NULL
292 #define pseudo_emit_struct NULL
293
294 extern PARSEFUNC(pseudo_parse_endstruct);
295 #define pseudo_resolve_endstruct NULL
296 #define pseudo_emit_endstruct NULL
297
298 instab_t instab[] =
299 {
300
301 { "abx", { 0x3a, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
302 { "adca", { 0x99, 0xa9, 0xb9, 0x89}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
303 { "adcb", { 0xd9, 0xe9, 0xf9, 0xc9}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
304 { "adcd", { 0x1099, 0x10a9, 0x10b9, 0x1089},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
305 { "adcr", { 0x1031, -1, -1, -1 }, insn_parse_rtor, insn_resolve_rtor, insn_emit_rtor, lwasm_insn_is6309},
306 { "adda", { 0x9b, 0xab, 0xbb, 0x8b}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
307 { "addb", { 0xdb, 0xeb, 0xfb, 0xcb}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
308 { "addd", { 0xd3, 0xe3, 0xf3, 0xc3}, insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
309 { "adde", { 0x119b, 0x11ab, 0x11bb, 0x118b},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},
310 { "addf", { 0x11db, 0x11eb, 0x11fb, 0x11cb},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},
311 { "addr", { 0x1030, -1, -1, -1 }, insn_parse_rtor, insn_resolve_rtor, insn_emit_rtor, lwasm_insn_is6309},
312 { "addw", { 0x109b, 0x10ab, 0x10bb, 0x108b},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
313 { "aim", { 0x02, 0x62, 0x72, -1 }, insn_parse_logicmem, insn_resolve_logicmem, insn_emit_logicmem, lwasm_insn_is6309},
314 { "anda", { 0x94, 0xa4, 0xb4, 0x84}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
315 { "andb", { 0xd4, 0xe4, 0xf4, 0xc4}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
316 { "andcc", { 0x1c, -1, -1, 0x1c}, insn_parse_imm8, insn_resolve_imm8, insn_emit_imm8, lwasm_insn_normal},
317 { "andd", { 0x1094, 0x10a4, 0x10b4, 0x1084},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
318 { "andr", { 0x1034, -1, -1, -1 }, insn_parse_rtor, insn_resolve_rtor, insn_emit_rtor, lwasm_insn_is6309},
319 { "asl", { 0x08, 0x68, 0x78, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
320 { "asla", { 0x48, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
321 { "aslb", { 0x58, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
322 { "asld", { 0x1048, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
323 { "asr", { 0x07, 0x67, 0x77, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
324 { "asra", { 0x47, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
325 { "asrb", { 0x57, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
326 { "asrd", { 0x1047, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
327
328 { "band", { 0x1130, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
329 { "bcc", { 0x24, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
330 { "bcs", { 0x25, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
331 { "beor", { 0x1134, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
332 { "beq", { 0x27, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
333 { "bge", { 0x2c, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
334 { "bgt", { 0x2e, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
335 { "bhi", { 0x22, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
336 { "bhs", { 0x24, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
337 { "biand", { 0x1131, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
338 { "bieor", { 0x1135, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
339 { "bior", { 0x1133, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
340 { "bita", { 0x95, 0xa5, 0xb5, 0x85}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
341 { "bitb", { 0xd5, 0xe5, 0xf5, 0xc5}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
342 { "bitd", { 0x1095, 0x10a5, 0x10b5, 0x1085},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
343 { "bitmd", { 0x113c, -1, -1, 0x113c},insn_parse_imm8, insn_resolve_imm8, insn_emit_imm8, lwasm_insn_is6309},
344 { "ble", { 0x2f, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
345 { "blo", { 0x25, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
346 { "bls", { 0x23, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
347 { "blt", { 0x2d, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
348 { "bmi", { 0x2b, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
349 { "bne", { 0x26, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
350 { "bor", { 0x1132, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
351 { "bpl", { 0x2a, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
352 { "bra", { 0x20, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
353 { "brn", { 0x21, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
354 { "bsr", { 0x8d, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
355 { "bvc", { 0x28, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
356 { "bvs", { 0x29, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
357
358 { "clr", { 0x0f, 0x6f, 0x7f, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
359 { "clra", { 0x4f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
360 { "clrb", { 0x5f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
361 { "clrd", { 0x104f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
362 { "clre", { 0x114f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
363 { "clrf", { 0x115f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
364 { "clrw", { 0x105f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
365 { "cmpa", { 0x91, 0xa1, 0xb1, 0x81}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
366 { "cmpb", { 0xd1, 0xe1, 0xf1, 0xc1}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
367 { "cmpd", { 0x1093, 0x10a3, 0x10b3, 0x1083},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
368 { "cmpe", { 0x1191, 0x11a1, 0x11b1, 0x1181},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},
369 { "cmpf", { 0x11d1, 0x11e1, 0x11f1, 0x11c1},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},
370 { "cmpr", { 0x1037, -1, -1, -1 }, insn_parse_rtor, insn_resolve_rtor, insn_emit_rtor, lwasm_insn_is6309},
371 { "cmps", { 0x119c, 0x11ac, 0x11bc, 0x118c},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
372 { "cmpu", { 0x1193, 0x11a3, 0x11b3, 0x1183},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
373 { "cmpw", { 0x1091, 0x10a1, 0x10b1, 0x1081},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
374 { "cmpx", { 0x9c, 0xac, 0xbc, 0x8c}, insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
375 { "cmpy", { 0x109c, 0x10ac, 0x10bc, 0x108c},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
376 { "com", { 0x03, 0x63, 0x73, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
377 { "coma", { 0x43, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
378 { "comb", { 0x53, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
379 { "comd", { 0x1043, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
380 { "come", { 0x1143, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
381 { "comf", { 0x1153, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
382 { "comw", { 0x1053, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
383 { "cwai", { 0x3c, -1, -1, -1 }, insn_parse_imm8, insn_resolve_imm8, insn_emit_imm8, lwasm_insn_normal},
384
385 { "daa", { 0x19, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
386 { "dec", { 0x0a, 0x6a, 0x7a, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
387 { "deca", { 0x4a, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
388 { "decb", { 0x5a, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
389 { "decd", { 0x104a, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
390 { "dece", { 0x114a, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
391 { "decf", { 0x115a, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
392 { "decw", { 0x105a, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
393 { "divd", { 0x118d, 0x119d, 0x11ad, 0x11bd},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},
394 { "divq", { 0x118e, 0x119e, 0x11ae, 0x11be},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
395
396 { "eim", { 0x05, 0x65, 0x75, -1 }, insn_parse_logicmem, insn_resolve_logicmem, insn_emit_logicmem, lwasm_insn_is6309},
397 { "eora", { 0x98, 0xa8, 0xb8, 0x88}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
398 { "eorb", { 0xd8, 0xe8, 0xf8, 0xc8}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
399 { "eord", { 0x1098, 0x10a8, 0x10b8, 0x1088},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
400 { "eorr", { 0x1036, -1, -1, -1 }, insn_parse_rtor, insn_resolve_rtor, insn_emit_rtor, lwasm_insn_is6309},
401 { "exg", { 0x1e, -1, -1, -1 }, insn_parse_rtor, insn_resolve_rtor, insn_emit_rtor, lwasm_insn_normal},
402
403 { "inc", { 0x0c, 0x6c, 0x7c, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
404 { "inca", { 0x4c, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
405 { "incb", { 0x5c, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
406 { "incd", { 0x104c, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
407 { "ince", { 0x114c, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
408 { "incf", { 0x115c, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
409 { "incw", { 0x105c, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
410
411 { "jmp", { 0x0e, 0x6e, 0x7e, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
412 { "jsr", { 0x9d, 0xad, 0xbd, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
413
414 { "lbcc", { 0x1024, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
415 { "lbcs", { 0x1025, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
416 { "lbeq", { 0x1027, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
417 { "lbge", { 0x102c, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
418 { "lbgt", { 0x102e, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
419 { "lbhi", { 0x1022, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
420 { "lbhs", { 0x1024, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
421 { "lble", { 0x102f, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
422 { "lblo", { 0x1025, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
423 { "lbls", { 0x1023, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
424 { "lblt", { 0x102d, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
425 { "lbmi", { 0x102b, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
426 { "lbne", { 0x1026, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
427 { "lbpl", { 0x102a, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
428 { "lbra", { 0x16, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
429 { "lbrn", { 0x1021, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
430 { "lbsr", { 0x17, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
431 { "lbvc", { 0x1028, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
432 { "lbvs", { 0x1029, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
433 { "lda", { 0x96, 0xa6, 0xb6, 0x86}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
434 { "ldb", { 0xd6, 0xe6, 0xf6, 0xc6}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
435 { "ldbt", { 0x1136, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
436 { "ldd", { 0xdc, 0xec, 0xfc, 0xcc}, insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
437 { "lde", { 0x1196, 0x11a6, 0x11b6, 0x1186},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},
438 { "ldf", { 0x11d6, 0x11e6, 0x11f6, 0x11c6},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},
439 { "ldq", { 0x10dc, 0x10ec, 0x10fc, 0xcd}, insn_parse_gen32, insn_resolve_gen32, insn_emit_gen32, lwasm_insn_is6309},
440 { "lds", { 0x10de, 0x10ee, 0x10fe, 0x10ce},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
441 { "ldu", { 0xde, 0xee, 0xfe, 0xce}, insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
442 { "ldw", { 0x1096, 0x10a6, 0x10b6, 0x1086},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
443 { "ldx", { 0x9e, 0xae, 0xbe, 0x8e}, insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
444 { "ldy", { 0x109e, 0x10ae, 0x10be, 0x108e},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
445 { "ldmd", { 0x113d, -1, -1, 0x113d},insn_parse_imm8, insn_resolve_imm8, insn_emit_imm8, lwasm_insn_is6309},
446 { "leas", { 0x32, -1, -1, -1 }, insn_parse_indexed, insn_resolve_indexed, insn_emit_indexed, lwasm_insn_normal},
447 { "leau", { 0x33, -1, -1, -1 }, insn_parse_indexed, insn_resolve_indexed, insn_emit_indexed, lwasm_insn_normal},
448 { "leax", { 0x30, -1, -1, -1 }, insn_parse_indexed, insn_resolve_indexed, insn_emit_indexed, lwasm_insn_normal},
449 { "leay", { 0x31, -1, -1, -1 }, insn_parse_indexed, insn_resolve_indexed, insn_emit_indexed, lwasm_insn_normal},
450 { "lsl", { 0x08, 0x68, 0x78, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
451 { "lsla", { 0x48, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
452 { "lslb", { 0x58, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
453 { "lsld", { 0x1048, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
454 { "lsr", { 0x04, 0x64, 0x74, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
455 { "lsra", { 0x44, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
456 { "lsrb", { 0x54, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
457 { "lsrd", { 0x1044, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
458 { "lsrw", { 0x1054, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
459
460 { "mul", { 0x3d, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
461 { "muld", { 0x118f, 0x119f, 0x11af, 0x11bf},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
462
463 { "neg", { 0x00, 0x60, 0x70, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
464 { "nega", { 0x40, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
465 { "negb", { 0x50, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
466 { "negd", { 0x1040, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
467
468 { "nop", { 0x12, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
469
470 { "oim", { 0x01, 0x61, 0x71, -1 }, insn_parse_logicmem, insn_resolve_logicmem, insn_emit_logicmem, lwasm_insn_is6309},
471 { "ora", { 0x9a, 0xaa, 0xba, 0x8a}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
472 { "orb", { 0xda, 0xea, 0xfa, 0xca}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
473 { "orcc", { 0x1a, -1, -1, 0x1a }, insn_parse_imm8, insn_resolve_imm8, insn_emit_imm8, lwasm_insn_normal},
474 { "ord", { 0x109a, 0x10aa, 0x10ba, 0x108a},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
475 { "orr", { 0x1035, -1, -1, -1 }, insn_parse_rtor, insn_resolve_rtor, insn_emit_rtor, lwasm_insn_is6309},
476
477 { "pshs", { 0x34, -1, -1, -1 }, insn_parse_rlist, insn_resolve_rlist, insn_emit_rlist, lwasm_insn_normal},
478 { "pshsw", { 0x1038, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
479 { "pshu", { 0x36, -1, -1, -1 }, insn_parse_rlist, insn_resolve_rlist, insn_emit_rlist, lwasm_insn_normal},
480 { "pshuw", { 0x103a, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
481 { "puls", { 0x35, -1, -1, -1 }, insn_parse_rlist, insn_resolve_rlist, insn_emit_rlist, lwasm_insn_normal},
482 { "pulsw", { 0x1039, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
483 { "pulu", { 0x37, -1, -1, -1 }, insn_parse_rlist, insn_resolve_rlist, insn_emit_rlist, lwasm_insn_normal},
484 { "puluw", { 0x103b, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
485
486 { "rol", { 0x09, 0x69, 0x79, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
487 { "rola", { 0x49, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
488 { "rolb", { 0x59, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
489 { "rold", { 0x1049, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
490 { "rolw", { 0x1059, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
491 { "ror", { 0x06, 0x66, 0x76, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
492 { "rora", { 0x46, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
493 { "rorb", { 0x56, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
494 { "rord", { 0x1046, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
495 { "rorw", { 0x1056, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
496 { "rti", { 0x3b, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
497 { "rts", { 0x39, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
498
499 { "sbca", { 0x92, 0xa2, 0xb2, 0x82}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
500 { "sbcb", { 0xd2, 0xe2, 0xf2, 0xc2}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
501 { "sbcd", { 0x1092, 0x10a2, 0x10b2, 0x1082},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
502 { "sbcr", { 0x1033, -1, -1, -1 }, insn_parse_rtor, insn_resolve_rtor, insn_emit_rtor, lwasm_insn_is6309},
503 { "sex", { 0x1d, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
504 { "sexw", { 0x14, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
505 { "sta", { 0x97, 0xa7, 0xb7, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
506 { "stb", { 0xd7, 0xe7, 0xf7, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
507 { "stbt", { 0x1137, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
508 { "std", { 0xdd, 0xed, 0xfd, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
509 { "ste", { 0x1197, 0x11a7, 0x11b7, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_is6309},
510 { "stf", { 0x11d7, 0x11e7, 0x11f7, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_is6309},
511 { "stq", { 0x10dd, 0x10ed, 0x10fd, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_is6309},
512 { "sts", { 0x10df, 0x10ef, 0x10ff, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
513 { "stu", { 0xdf, 0xef, 0xff, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
514 { "stw", { 0x1097, 0x10a7, 0x10b7, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_is6309},
515 { "stx", { 0x9f, 0xaf, 0xbf, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
516 { "sty", { 0x109f, 0x10af, 0x10bf, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
517 { "suba", { 0x90, 0xa0, 0xb0, 0x80}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
518 { "subb", { 0xd0, 0xe0, 0xf0, 0xc0}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
519 { "subd", { 0x93, 0xa3, 0xb3, 0x83}, insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
520 { "sube", { 0x1190, 0x11a0, 0x11b0, 0x1180},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},
521 { "subf", { 0x11d0, 0x11e0, 0x11f0, 0x11c0},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},
522 { "subr", { 0x1032, -1, -1, -1 }, insn_parse_rtor, insn_resolve_rtor, insn_emit_rtor, lwasm_insn_is6309},
523 { "subw", { 0x1090, 0x10a0, 0x1090, 0x1080},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},
524 { "swi", { 0x3f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
525 { "swi2", { 0x103f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
526 { "swi3", { 0x113f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
527 { "sync", { 0x13, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
528
529 // note: r+,r+ r-,r- r+,r r,r+
530 { "tfm", { 0x1138, 0x1139, 0x113a, 0x113b },insn_parse_tfm, insn_resolve_tfm, insn_emit_tfm, lwasm_insn_is6309},
531
532 // compatibility opcodes for tfm in other assemblers
533 { "copy", { 0x1138, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
534 { "copy+", { 0x1138, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
535 { "tfrp", { 0x1138, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
536
537 { "copy-", { 0x1139, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
538 { "tfrm", { 0x1139, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
539
540 { "imp", { 0x113a, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
541 { "implode", { 0x113a, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
542 { "tfrs", { 0x113a, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
543
544 { "exp", { 0x113b, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
545 { "expand", { 0x113b, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
546 { "tfrr", { 0x113b, -1, -1, -1}, insn_parse_tfmrtor, insn_resolve_tfmrtor, insn_emit_tfmrtor, lwasm_insn_is6309},
547
548 { "tfr", { 0x1f, -1, -1, -1 }, insn_parse_rtor, insn_resolve_rtor, insn_emit_rtor, lwasm_insn_normal},
549 { "tim", { 0x0b, 0x6b, 0x7b, -1 }, insn_parse_logicmem, insn_resolve_logicmem, insn_emit_logicmem, lwasm_insn_is6309},
550 { "tst", { 0x0d, 0x6d, 0x7d, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
551 { "tsta", { 0x4d, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
552 { "tstb", { 0x5d, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
553 { "tstd", { 0x104d, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
554 { "tste", { 0x114d, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
555 { "tstf", { 0x115d, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
556 { "tstw", { 0x105d, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
557
558 { "org", { -1, -1, -1, -1 }, pseudo_parse_org, pseudo_resolve_org, pseudo_emit_org, lwasm_insn_normal},
559 { "equ", { -1, -1, -1, -1 }, pseudo_parse_equ, pseudo_resolve_equ, pseudo_emit_equ, lwasm_insn_setsym},
560 { "=", { -1, -1, -1, -1 }, pseudo_parse_equ, pseudo_resolve_equ, pseudo_emit_equ, lwasm_insn_setsym},
561
562 { "extern", { -1, -1, -1, -1 }, pseudo_parse_extern, pseudo_resolve_extern, pseudo_emit_extern, lwasm_insn_setsym},
563 { "external", { -1, -1, -1, -1 }, pseudo_parse_extern, pseudo_resolve_extern, pseudo_emit_extern, lwasm_insn_setsym},
564 { "import", { -1, -1, -1, -1 }, pseudo_parse_extern, pseudo_resolve_extern, pseudo_emit_extern, lwasm_insn_setsym},
565 { "export", { -1, -1, -1, -1 }, pseudo_parse_export, pseudo_resolve_export, pseudo_emit_export, lwasm_insn_setsym},
566 { "extdep", { -1, -1, -1, -1 }, pseudo_parse_extdep, pseudo_resolve_extdep, pseudo_emit_extdep, lwasm_insn_setsym},
567
568 { "rmb", { -1, -1, -1, -1 }, pseudo_parse_rmb, pseudo_resolve_rmb, pseudo_emit_rmb, lwasm_insn_struct},
569 { "rmd", { -1, -1, -1, -1 }, pseudo_parse_rmd, pseudo_resolve_rmd, pseudo_emit_rmd, lwasm_insn_struct},
570 { "rmw", { -1, -1, -1, -1 }, pseudo_parse_rmd, pseudo_resolve_rmd, pseudo_emit_rmd, lwasm_insn_struct},
571 { "rmq", { -1, -1, -1, -1 }, pseudo_parse_rmq, pseudo_resolve_rmq, pseudo_emit_rmq, lwasm_insn_struct},
572
573 { "zmb", { -1, -1, -1, -1 }, pseudo_parse_zmb, pseudo_resolve_zmb, pseudo_emit_zmb, lwasm_insn_normal},
574 { "zmd", { -1, -1, -1, -1 }, pseudo_parse_zmd, pseudo_resolve_zmd, pseudo_emit_zmd, lwasm_insn_normal},
575 { "zmq", { -1, -1, -1, -1 }, pseudo_parse_zmq, pseudo_resolve_zmq, pseudo_emit_zmq, lwasm_insn_normal},
576
577 { "fcc", { -1, -1, -1, -1 }, pseudo_parse_fcc, pseudo_resolve_fcc, pseudo_emit_fcc, lwasm_insn_normal},
578 { "fcn", { -1, -1, -1, -1 }, pseudo_parse_fcn, pseudo_resolve_fcn, pseudo_emit_fcn, lwasm_insn_normal},
579 { "fcs", { -1, -1, -1, -1 }, pseudo_parse_fcs, pseudo_resolve_fcs, pseudo_emit_fcs, lwasm_insn_normal},
580
581 { "fcb", { -1, -1, -1, -1 }, pseudo_parse_fcb, pseudo_resolve_fcb, pseudo_emit_fcb, lwasm_insn_normal},
582 { "fdb", { -1, -1, -1, -1 }, pseudo_parse_fdb, pseudo_resolve_fdb, pseudo_emit_fdb, lwasm_insn_normal},
583 { "fqb", { -1, -1, -1, -1 }, pseudo_parse_fqb, pseudo_resolve_fqb, pseudo_emit_fqb, lwasm_insn_normal},
584 { "end", { -1, -1, -1, -1 }, pseudo_parse_end, pseudo_resolve_end, pseudo_emit_end, lwasm_insn_normal},
585
586 { "includebin", { -1, -1, -1, -1}, pseudo_parse_includebin,pseudo_resolve_includebin, pseudo_emit_includebin, lwasm_insn_normal},
587 { "include", { -1, -1, -1, -1 }, pseudo_parse_include, pseudo_resolve_include, pseudo_emit_include, lwasm_insn_normal},
588 { "use", { -1, -1, -1, -1 }, pseudo_parse_include, pseudo_resolve_include, pseudo_emit_include, lwasm_insn_normal},
589
590 { "align", { -1, -1, -1, -1 }, pseudo_parse_align, pseudo_resolve_align, pseudo_emit_align, lwasm_insn_normal},
591
592 { "error", { -1, -1, -1, -1}, pseudo_parse_error, pseudo_resolve_error, pseudo_emit_error, lwasm_insn_normal},
593 { "warning", { -1, -1, -1, -1}, pseudo_parse_warning, pseudo_resolve_warning, pseudo_emit_warning, lwasm_insn_normal},
594
595 // these are *dangerous*
596 { "ifp1", { -1, -1, -1, -1}, pseudo_parse_ifp1, pseudo_resolve_ifp1, pseudo_emit_ifp1, lwasm_insn_cond},
597 { "ifp2", { -1, -1, -1, -1}, pseudo_parse_ifp2, pseudo_resolve_ifp2, pseudo_emit_ifp2, lwasm_insn_cond},
598
599 { "ifeq", { -1, -1, -1, -1}, pseudo_parse_ifeq, pseudo_resolve_ifeq, pseudo_emit_ifeq, lwasm_insn_cond},
600 { "ifne", { -1, -1, -1, -1}, pseudo_parse_ifne, pseudo_resolve_ifne, pseudo_emit_ifne, lwasm_insn_cond},
601 { "if", { -1, -1, -1, -1}, pseudo_parse_ifne, pseudo_resolve_ifne, pseudo_emit_ifne, lwasm_insn_cond},
602 { "ifgt", { -1, -1, -1, -1}, pseudo_parse_ifgt, pseudo_resolve_ifgt, pseudo_emit_ifgt, lwasm_insn_cond},
603 { "ifge", { -1, -1, -1, -1}, pseudo_parse_ifge, pseudo_resolve_ifge, pseudo_emit_ifge, lwasm_insn_cond},
604 { "iflt", { -1, -1, -1, -1}, pseudo_parse_iflt, pseudo_resolve_iflt, pseudo_emit_iflt, lwasm_insn_cond},
605 { "ifle", { -1, -1, -1, -1}, pseudo_parse_ifle, pseudo_resolve_ifle, pseudo_emit_ifle, lwasm_insn_cond},
606 { "endc", { -1, -1, -1, -1}, pseudo_parse_endc, pseudo_resolve_endc, pseudo_emit_endc, lwasm_insn_cond},
607 { "else", { -1, -1, -1, -1}, pseudo_parse_else, pseudo_resolve_else, pseudo_emit_else, lwasm_insn_cond},
608 { "ifdef", { -1, -1, -1, -1}, pseudo_parse_ifdef, pseudo_resolve_ifdef, pseudo_emit_ifdef, lwasm_insn_cond},
609 { "ifndef", { -1, -1, -1, -1}, pseudo_parse_ifndef, pseudo_resolve_ifndef, pseudo_emit_ifndef, lwasm_insn_cond},
610
611 { "macro", { -1, -1, -1, -1}, pseudo_parse_macro, pseudo_resolve_macro, pseudo_emit_macro, lwasm_insn_cond | lwasm_insn_setsym},
612 { "endm", { -1, -1, -1, -1}, pseudo_parse_endm, pseudo_resolve_endm, pseudo_emit_endm, lwasm_insn_cond | lwasm_insn_setsym | lwasm_insn_endm},
613
614 { "setdp", { -1, -1, -1, -1}, pseudo_parse_setdp, pseudo_resolve_setdp, pseudo_emit_setdp, lwasm_insn_normal},
615 { "set", { -1, -1, -1, -1}, pseudo_parse_set, pseudo_resolve_set, pseudo_emit_set, lwasm_insn_setsym},
616
617
618 { "section", { -1, -1, -1, -1}, pseudo_parse_section, pseudo_resolve_section, pseudo_emit_section, lwasm_insn_normal},
619 { "sect", { -1, -1, -1, -1}, pseudo_parse_section, pseudo_resolve_section, pseudo_emit_section, lwasm_insn_normal},
620 { "endsect", { -1, -1, -1, -1}, pseudo_parse_endsection,pseudo_resolve_endsection, pseudo_emit_endsection, lwasm_insn_normal},
621 { "endsection", { -1, -1, -1, -1}, pseudo_parse_endsection,pseudo_resolve_endsection, pseudo_emit_endsection, lwasm_insn_normal},
622
623 { "struct", { -1, -1, -1, -1}, pseudo_parse_struct, pseudo_resolve_struct, pseudo_emit_struct, lwasm_insn_normal},
624 { "ends", { -1, -1, -1, -1}, pseudo_parse_endstruct, pseudo_resolve_endstruct, pseudo_emit_endstruct, lwasm_insn_struct},
625 { "endstruct", { -1, -1, -1, -1}, pseudo_parse_endstruct, pseudo_resolve_endstruct, pseudo_emit_endstruct, lwasm_insn_struct},
626
627
628 { "pragma", { -1, -1, -1, -1}, pseudo_parse_pragma, pseudo_resolve_pragma, pseudo_emit_pragma, lwasm_insn_normal},
629 { "*pragma", { -1, -1, -1, -1}, pseudo_parse_starpragma,pseudo_resolve_starpragma, pseudo_emit_starpragma, lwasm_insn_normal},
630
631 // for os9 target
632 { "os9", { -1, -1, -1, -1 }, pseudo_parse_os9, pseudo_resolve_os9, pseudo_emit_os9, lwasm_insn_normal},
633 { "mod", { -1, -1, -1, -1 }, pseudo_parse_mod, pseudo_resolve_mod, pseudo_emit_mod, lwasm_insn_normal},
634 { "emod", { -1, -1, -1, -1 }, pseudo_parse_emod, pseudo_resolve_emod, pseudo_emit_emod, lwasm_insn_normal},
635
636 // for compatibility with gcc6809 output...
637
638 { ".area", { -1, -1, -1, -1}, pseudo_parse_section, pseudo_resolve_section, pseudo_emit_section, lwasm_insn_normal},
639 { ".globl", { -1, -1, -1, -1}, pseudo_parse_export, pseudo_resolve_export, pseudo_emit_export, lwasm_insn_normal},
640
641 { ".module", { -1, -1, -1, -1}, pseudo_parse_noop, pseudo_resolve_noop, pseudo_emit_noop, lwasm_insn_normal},
642
643 { ".4byte", { -1, -1, -1, -1}, pseudo_parse_fqb, pseudo_resolve_fqb, pseudo_emit_fqb, lwasm_insn_normal},
644 { ".quad", { -1, -1, -1, -1}, pseudo_parse_fqb, pseudo_resolve_fqb, pseudo_emit_fqb, lwasm_insn_normal},
645
646 { ".word", { -1, -1, -1, -1}, pseudo_parse_fdb, pseudo_resolve_fdb, pseudo_emit_fdb, lwasm_insn_normal},
647 { ".dw", { -1, -1, -1, -1}, pseudo_parse_fdb, pseudo_resolve_fdb, pseudo_emit_fdb, lwasm_insn_normal},
648
649 { ".byte", { -1, -1, -1, -1}, pseudo_parse_fcb, pseudo_resolve_fcb, pseudo_emit_fcb, lwasm_insn_normal},
650 { ".db", { -1, -1, -1, -1}, pseudo_parse_fcb, pseudo_resolve_fcb, pseudo_emit_fcb, lwasm_insn_normal},
651
652 { ".ascii", { -1, -1, -1, -1}, pseudo_parse_fcc, pseudo_resolve_fcc, pseudo_emit_fcc, lwasm_insn_normal},
653 { ".str", { -1, -1, -1, -1}, pseudo_parse_fcc, pseudo_resolve_fcc, pseudo_emit_fcc, lwasm_insn_normal},
654
655 { ".ascis", { -1, -1, -1, -1}, pseudo_parse_fcs, pseudo_resolve_fcs, pseudo_emit_fcs, lwasm_insn_normal},
656 { ".strs", { -1, -1, -1, -1}, pseudo_parse_fcs, pseudo_resolve_fcs, pseudo_emit_fcs, lwasm_insn_normal},
657
658 { ".asciz", { -1, -1, -1, -1}, pseudo_parse_fcn, pseudo_resolve_fcn, pseudo_emit_fcn, lwasm_insn_normal},
659 { ".strz", { -1, -1, -1, -1}, pseudo_parse_fcn, pseudo_resolve_fcn, pseudo_emit_fcn, lwasm_insn_normal},
660
661 { ".blkb", { -1, -1, -1, -1}, pseudo_parse_rmb, pseudo_resolve_rmb, pseudo_emit_rmb, lwasm_insn_struct},
662 { ".ds", { -1, -1, -1, -1}, pseudo_parse_rmb, pseudo_resolve_rmb, pseudo_emit_rmb, lwasm_insn_struct},
663 { ".rs", { -1, -1, -1, -1}, pseudo_parse_rmb, pseudo_resolve_rmb, pseudo_emit_rmb, lwasm_insn_struct},
664
665 // for compatibility
666 { ".end", { -1, -1, -1, -1 }, pseudo_parse_end, pseudo_resolve_end, pseudo_emit_end, lwasm_insn_normal},
667
668 // extra ops that are ignored because they are generally only for
669 // pretty printing the listing
670 { "nam", { -1, -1, -1, -1 }, pseudo_parse_noop, pseudo_resolve_noop, pseudo_emit_noop, lwasm_insn_normal},
671 { "pag", { -1, -1, -1, -1 }, pseudo_parse_noop, pseudo_resolve_noop, pseudo_emit_noop, lwasm_insn_normal},
672 { "ttl", { -1, -1, -1, -1 }, pseudo_parse_noop, pseudo_resolve_noop, pseudo_emit_noop, lwasm_insn_normal},
673 { ".bank", { -1, -1, -1, -1 }, pseudo_parse_noop, pseudo_resolve_noop, pseudo_emit_noop, lwasm_insn_normal},
674
675 // flag end of table
676 { NULL, { -1, -1, -1, -1 }, NULL, NULL, lwasm_insn_normal}
677 };