Mercurial > hg-old > index.cgi
annotate src/instab.c @ 11:c4b2f96eaea6 1.0
Fixed error in instruction table
author | lost |
---|---|
date | Sun, 04 Jan 2009 05:44:50 +0000 |
parents | 34568fab6058 |
children |
rev | line source |
---|---|
0 | 1 /* |
4
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
2 instab.c |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
3 Copyright © 2008 William Astle |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
4 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
5 This file is part of LWASM. |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
6 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
7 LWASM is free software: you can redistribute it and/or modify it under the |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
8 terms of the GNU General Public License as published by the Free Software |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
9 Foundation, either version 3 of the License, or (at your option) any later |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
10 version. |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
11 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
12 This program is distributed in the hope that it will be useful, but WITHOUT |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
15 more details. |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
16 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
17 You should have received a copy of the GNU General Public License along with |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
18 this program. If not, see <http://www.gnu.org/licenses/>. |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
19 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
20 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
21 Contains the instruction table for assembling code |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
22 */ |
0 | 23 |
24 #include <stdlib.h> | |
25 | |
26 #define __instab_c_seen__ | |
27 #include "instab.h" | |
28 | |
29 extern void insn_gen(asmstate_t *as, sourceline_t *cl, char **optr); | |
30 extern void insn_inh(asmstate_t *as, sourceline_t *cl, char **optr); | |
31 extern void insn_indexed(asmstate_t *as, sourceline_t *cl, char **optr); | |
32 extern void insn_rtor(asmstate_t *as, sourceline_t *cl, char **optr); | |
33 extern void insn_rlist(asmstate_t *as, sourceline_t *cl, char **optr); | |
34 extern void insn_logicmem(asmstate_t *as, sourceline_t *cl, char **optr); | |
35 extern void insn_bitbit(asmstate_t *as, sourceline_t *cl, char **optr); | |
36 extern void insn_tfm(asmstate_t *as, sourceline_t *cl, char **optr); | |
37 extern void insn_rel8(asmstate_t *as, sourceline_t *cl, char **optr); | |
38 extern void insn_rel16(asmstate_t *as, sourceline_t *cl, char **optr); | |
39 extern void pseudo_org(asmstate_t *as, sourceline_t *cl, char **optr); | |
40 extern void pseudo_equ(asmstate_t *as, sourceline_t *cl, char **optr); | |
41 extern void pseudo_setdp(asmstate_t *as, sourceline_t *cl, char **optr); | |
42 extern void pseudo_fcb(asmstate_t *as, sourceline_t *cl, char **optr); | |
43 extern void pseudo_fdb(asmstate_t *as, sourceline_t *cl, char **optr); | |
44 extern void pseudo_fqb(asmstate_t *as, sourceline_t *cl, char **optr); | |
45 extern void pseudo_fcc(asmstate_t *as, sourceline_t *cl, char **optr); | |
46 extern void pseudo_fcs(asmstate_t *as, sourceline_t *cl, char **optr); | |
47 extern void pseudo_fcn(asmstate_t *as, sourceline_t *cl, char **optr); | |
48 extern void pseudo_rmb(asmstate_t *as, sourceline_t *cl, char **optr); | |
49 extern void pseudo_rmd(asmstate_t *as, sourceline_t *cl, char **optr); | |
50 extern void pseudo_rmq(asmstate_t *as, sourceline_t *cl, char **optr); | |
51 extern void pseudo_zmb(asmstate_t *as, sourceline_t *cl, char **optr); | |
52 extern void pseudo_zmd(asmstate_t *as, sourceline_t *cl, char **optr); | |
53 extern void pseudo_zmq(asmstate_t *as, sourceline_t *cl, char **optr); | |
54 extern void pseudo_align(asmstate_t *as, sourceline_t *cl, char **optr); | |
55 extern void pseudo_end(asmstate_t *as, sourceline_t *cl, char **optr); | |
56 extern void pseudo_include(asmstate_t *as, sourceline_t *cl, char **optr); | |
57 extern void pseudo_macro(asmstate_t *as, sourceline_t *cl, char **optr); | |
58 extern void pseudo_endm(asmstate_t *as, sourceline_t *cl, char **optr); | |
59 extern void pseudo_cond(asmstate_t *as, sourceline_t *cl, char **optr); | |
60 extern void pseudo_else(asmstate_t *as, sourceline_t *cl, char **optr); | |
61 extern void pseudo_endc(asmstate_t *as, sourceline_t *cl, char **optr); | |
62 extern void pseudo_ifne(asmstate_t *as, sourceline_t *cl, char **optr); | |
63 extern void pseudo_ifeq(asmstate_t *as, sourceline_t *cl, char **optr); | |
64 extern void pseudo_ifge(asmstate_t *as, sourceline_t *cl, char **optr); | |
65 extern void pseudo_ifgt(asmstate_t *as, sourceline_t *cl, char **optr); | |
66 extern void pseudo_ifle(asmstate_t *as, sourceline_t *cl, char **optr); | |
67 extern void pseudo_iflt(asmstate_t *as, sourceline_t *cl, char **optr); | |
68 extern void pseudo_error(asmstate_t *as, sourceline_t *cl, char **optr); | |
69 extern void pseudo_set(asmstate_t *as, sourceline_t *cl, char **optr); | |
70 extern void pseudo_pragma(asmstate_t *as, sourceline_t *cl, char **optr); | |
71 extern void pseudo_starpragma(asmstate_t *as, sourceline_t *cl, char **optr); | |
72 | |
73 instab_t instab[] = | |
74 { | |
75 { "abx", { 0x3a, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
76 { "adca", { 0x99, 0xa9, 0xb9, 0x89 }, INSTYPE_GEN8, 0, insn_gen }, | |
77 { "adcb", { 0xd9, 0xe9, 0xf9, 0xc9 }, INSTYPE_GEN8, 0, insn_gen }, | |
78 { "adcd", { 0x1099, 0x10a9, 0x10b9, 0x1089 }, INSTYPE_GEN, 0, insn_gen }, | |
79 { "adcr", { 0x1031, -0x1, -0x1, -0x1 }, INSTYPE_RTOR, 0, insn_rtor }, | |
80 { "adda", { 0x9b, 0xab, 0xbb, 0x8b }, INSTYPE_GEN8, 0, insn_gen }, | |
81 { "addb", { 0xdb, 0xeb, 0xfb, 0xcb }, INSTYPE_GEN8, 0, insn_gen }, | |
82 { "addd", { 0xd3, 0xe3, 0xf3, 0xc3 }, INSTYPE_GEN, 0, insn_gen }, | |
83 { "adde", { 0x119b, 0x11ab, 0x11bb, 0x118b }, INSTYPE_GEN8, 0, insn_gen }, | |
84 { "addf", { 0x11db, 0x11eb, 0x11fb, 0x11cb }, INSTYPE_GEN8, 0, insn_gen }, | |
85 { "addr", { 0x1030, -0x1, -0x1, -0x1 }, INSTYPE_RTOR, 0, insn_rtor }, | |
86 { "addw", { 0x109b, 0x10ab, 0x10bb, 0x108b }, INSTYPE_GEN, 0, insn_gen }, | |
87 { "aim", { 0x02, 0x62, 0x72, -0x1 }, INSTYPE_LOGICMEM, 0, insn_logicmem }, | |
88 { "anda", { 0x94, 0xa4, 0xb4, 0x84 }, INSTYPE_GEN8, 0, insn_gen }, | |
89 { "andb", { 0xd4, 0xe4, 0xf4, 0xc4 }, INSTYPE_GEN8, 0, insn_gen }, | |
90 { "andcc", { 0x1c, -0x1, -0x1, 0x1c }, INSTYPE_IMM8, 0, insn_gen }, | |
91 { "andd", { 0x1094, 0x10a4, 0x10b4, 0x1084 }, INSTYPE_GEN, 0, insn_gen }, | |
92 { "andr", { 0x1034, -0x1, -0x1, -0x1 }, INSTYPE_RTOR, 0, insn_rtor }, | |
93 { "asl", { 0x08, 0x68, 0x78, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
94 { "asla", { 0x48, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
95 { "aslb", { 0x58, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
96 { "asld", { 0x1048, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
97 { "asr", { 0x07, 0x67, 0x77, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
98 { "asra", { 0x47, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
99 { "asrb", { 0x57, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
100 { "asrd", { 0x1047, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
101 | |
102 { "band", { 0x1130, -0x1, -0x1, -0x1 }, INSTYPE_BITBIT, 0, insn_bitbit }, | |
103 { "bcc", { 0x24, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
104 { "bcs", { 0x25, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
105 { "beor", { 0x1134, -0x1, -0x1, -0x1 }, INSTYPE_BITBIT, 0, insn_bitbit }, | |
106 { "beq", { 0x27, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
107 { "bge", { 0x2c, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
108 { "bgt", { 0x2e, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
109 { "bhi", { 0x22, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
110 { "bhs", { 0x24, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
111 { "biand", { 0x1131, -0x1, -0x1, -0x1 }, INSTYPE_BITBIT, 0, insn_bitbit }, | |
112 { "bieor", { 0x1135, -0x1, -0x1, -0x1 }, INSTYPE_BITBIT, 0, insn_bitbit }, | |
113 { "bior", { 0x1133, -0x1, -0x1, -0x1 }, INSTYPE_BITBIT, 0, insn_bitbit }, | |
114 { "bita", { 0x95, 0xa5, 0xb5, 0x85 }, INSTYPE_GEN8, 0, insn_gen }, | |
115 { "bitb", { 0xd5, 0xe5, 0xf5, 0xc5 }, INSTYPE_GEN8, 0, insn_gen }, | |
116 { "bitd", { 0x1095, 0x10a5, 0x10b5, 0x1085 }, INSTYPE_GEN, 0, insn_gen }, | |
117 { "bitmd", { 0x113c, -0x1, -0x1, 0x113c }, INSTYPE_IMM8, 0, insn_gen }, | |
118 { "ble", { 0x2f, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
119 { "blo", { 0x25, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
120 { "bls", { 0x23, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
121 { "blt", { 0x2d, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
122 { "bmi", { 0x2b, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
123 { "bne", { 0x26, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
124 { "bor", { 0x1132, -0x1, -0x1, -0x1 }, INSTYPE_BITBIT, 0, insn_bitbit }, | |
125 { "bpl", { 0x2a, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
126 { "bra", { 0x20, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
127 { "brn", { 0x21, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
128 { "bsr", { 0x8d, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
129 { "bvc", { 0x28, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
130 { "bvs", { 0x29, -0x1, -0x1, -0x1 }, INSTYPE_REL8, 0, insn_rel8 }, | |
131 | |
132 { "clr", { 0x0f, 0x6f, 0x7f, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
133 { "clra", { 0x4f, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
134 { "clrb", { 0x5f, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
135 { "clrd", { 0x104f, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
136 { "clre", { 0x114f, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
137 { "clrf", { 0x115f, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
138 { "clrw", { 0x105f, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
139 { "cmpa", { 0x91, 0xa1, 0xb1, 0x81 }, INSTYPE_GEN8, 0, insn_gen }, | |
140 { "cmpb", { 0xd1, 0xe1, 0xf1, 0xc1 }, INSTYPE_GEN8, 0, insn_gen }, | |
141 { "cmpd", { 0x1093, 0x10a3, 0x10b3, 0x1083 }, INSTYPE_GEN, 0, insn_gen }, | |
142 { "cmpe", { 0x1191, 0x11a1, 0x11b1, 0x1181 }, INSTYPE_GEN8, 0, insn_gen }, | |
143 { "cmpf", { 0x11d1, 0x11e1, 0x11f1, 0x11c1 }, INSTYPE_GEN8, 0, insn_gen }, | |
144 { "cmpr", { 0x1037, -0x1, -0x1, -0x1 }, INSTYPE_RTOR, 0, insn_rtor }, | |
145 { "cmps", { 0x119c, 0x11ac, 0x11bc, 0x118c }, INSTYPE_GEN, 0, insn_gen }, | |
146 { "cmpu", { 0x1193, 0x11a3, 0x11b3, 0x1183 }, INSTYPE_GEN, 0, insn_gen }, | |
147 { "cmpw", { 0x1091, 0x10a1, 0x10b1, 0x1081 }, INSTYPE_GEN, 0, insn_gen }, | |
148 { "cmpx", { 0x9c, 0xac, 0xbc, 0x8c }, INSTYPE_GEN, 0, insn_gen }, | |
149 { "cmpy", { 0x109c, 0x10ac, 0x10bc, 0x108c }, INSTYPE_GEN, 0, insn_gen }, | |
150 { "com", { 0x03, 0x63, 0x73, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
151 { "coma", { 0x43, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
152 { "comb", { 0x53, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
153 { "comd", { 0x1043, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
154 { "come", { 0x1143, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
155 { "comf", { 0x1153, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
156 { "comw", { 0x1053, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
157 { "cwai", { 0x3c, -0x1, -0x1, -0x1 }, INSTYPE_IMM8, 0, insn_gen }, | |
158 | |
159 { "daa", { 0x19, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
160 { "dec", { 0x0a, 0x6a, 0x7a, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
161 { "deca", { 0x4a, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
162 { "decb", { 0x5a, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
163 { "decd", { 0x104a, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
164 { "dece", { 0x114a, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
165 { "decf", { 0x115a, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
166 { "decw", { 0x105a, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
167 { "divd", { 0x118d, 0x119d, 0x11ad, 0x11bd }, INSTYPE_GEN8, 0, insn_gen }, | |
168 { "divq", { 0x118e, 0x119e, 0x11ae, 0x11be }, INSTYPE_GEN, 0, insn_gen }, | |
169 | |
170 { "eim", { 0x05, 0x65, 0x75, -0x1 }, INSTYPE_LOGICMEM, 0, insn_logicmem }, | |
171 { "eora", { 0x98, 0xa8, 0xb8, 0x88 }, INSTYPE_GEN8, 0, insn_gen }, | |
172 { "eorb", { 0xd8, 0xe9, 0xf9, 0xc8 }, INSTYPE_GEN8, 0, insn_gen }, | |
173 { "eord", { 0x1098, 0x10a8, 0x10b8, 0x1088 }, INSTYPE_GEN, 0, insn_gen }, | |
174 { "eorr", { 0x1036, -0x1, -0x1, -0x1 }, INSTYPE_RTOR, 0, insn_rtor }, | |
175 { "exg", { 0x1e, -0x1, -0x1, -0x1 }, INSTYPE_RTOR, 0, insn_rtor }, | |
176 | |
177 { "inc", { 0x0c, 0x6c, 0x7c, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
178 { "inca", { 0x4c, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
179 { "incb", { 0x5c, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
180 { "incd", { 0x104c, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
181 { "ince", { 0x114c, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
182 { "incf", { 0x115c, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
183 { "incw", { 0x105c, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
184 | |
185 { "jmp", { 0x0e, 0x6e, 0x7e, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
186 { "jsr", { 0x9d, 0xad, 0xbd, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
187 | |
188 { "lbcc", { 0x1024, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
189 { "lbcs", { 0x1025, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
190 { "lbeq", { 0x1027, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
191 { "lbge", { 0x102c, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
192 { "lbgt", { 0x102e, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
193 { "lbhi", { 0x1022, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
194 { "lbhs", { 0x1024, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
11 | 195 { "lble", { 0x102f, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, |
0 | 196 { "lblo", { 0x1025, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, |
197 { "lbls", { 0x1023, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
198 { "lblt", { 0x102d, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
199 { "lbmi", { 0x102b, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
200 { "lbne", { 0x1026, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
201 { "lbpl", { 0x102a, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
202 { "lbra", { 0x16, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
203 { "lbrn", { 0x1021, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
204 { "lbsr", { 0x17, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
205 { "lbvc", { 0x1028, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
206 { "lbvs", { 0x1029, -0x1, -0x1, -0x1 }, INSTYPE_REL16, 0, insn_rel16 }, | |
207 { "lda", { 0x96, 0xa6, 0xb6, 0x86 }, INSTYPE_GEN8, 0, insn_gen }, | |
208 { "ldb", { 0xd6, 0xe6, 0xf6, 0xc6 }, INSTYPE_GEN8, 0, insn_gen }, | |
209 { "ldbt", { 0x1136, -0x1, -0x1, -0x1 }, INSTYPE_BITBIT, 0, insn_bitbit }, | |
210 { "ldd", { 0xdc, 0xec, 0xfc, 0xcc }, INSTYPE_GEN, 0, insn_gen }, | |
211 { "lde", { 0x1196, 0x11a6, 0x11b6, 0x1186 }, INSTYPE_GEN8, 0, insn_gen }, | |
212 { "ldf", { 0x11d6, 0x11e6, 0x11f6, 0x11c6 }, INSTYPE_GEN8, 0, insn_gen }, | |
213 { "ldq", { 0x10dc, 0x10ec, 0x10fc, 0xcd }, INSTYPE_GEN32, 0, insn_gen }, | |
214 { "lds", { 0x10de, 0x10ee, 0x10fe, 0x10ce }, INSTYPE_GEN, 0, insn_gen }, | |
215 { "ldu", { 0xde, 0xee, 0xfe, 0xce }, INSTYPE_GEN, 0, insn_gen }, | |
216 { "ldw", { 0x1096, 0x10a6, 0x10b6, 0x1086 }, INSTYPE_GEN, 0, insn_gen }, | |
217 { "ldx", { 0x9e, 0xae, 0xbe, 0x8e }, INSTYPE_GEN, 0, insn_gen }, | |
218 { "ldy", { 0x109e, 0x10ae, 0x10be, 0x108e }, INSTYPE_GEN, 0, insn_gen }, | |
219 { "ldmd", { 0x113d, -0x1, -0x1, 0x113d }, INSTYPE_IMM8, 0, insn_gen }, | |
220 { "leas", { 0x32, -0x1, -0x1, -0x1 }, INSTYPE_INDEX, 0, insn_indexed }, | |
221 { "leau", { 0x33, -0x1, -0x1, -0x1 }, INSTYPE_INDEX, 0, insn_indexed }, | |
222 { "leax", { 0x30, -0x1, -0x1, -0x1 }, INSTYPE_INDEX, 0, insn_indexed }, | |
223 { "leay", { 0x31, -0x1, -0x1, -0x1 }, INSTYPE_INDEX, 0, insn_indexed }, | |
224 { "lsl", { 0x08, 0x68, 0x78, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
225 { "lsla", { 0x48, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
226 { "lslb", { 0x58, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
227 { "lsld", { 0x1048, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
228 { "lsr", { 0x04, 0x64, 0x74, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
229 { "lsra", { 0x44, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
230 { "lsrb", { 0x54, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
231 { "lsrd", { 0x1044, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
232 { "lsrw", { 0x1054, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
233 | |
234 { "mul", { 0x3d, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
235 { "muld", { 0x118f, 0x119f, 0x11af, 0x11bf }, INSTYPE_GEN, 0, insn_gen }, | |
236 | |
237 { "neg", { 0x00, 0x60, 0x70, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
238 { "nega", { 0x40, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
239 { "negb", { 0x50, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
240 { "negd", { 0x1040, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
241 { "nop", { 0x12, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
242 | |
243 { "oim", { 0x01, 0x61, 0x71, -0x1 }, INSTYPE_LOGICMEM, 0, insn_logicmem }, | |
244 { "ora", { 0x9a, 0xaa, 0xba, 0x8a }, INSTYPE_GEN8, 0, insn_gen }, | |
245 { "orb", { 0xda, 0xea, 0xfa, 0xca }, INSTYPE_GEN8, 0, insn_gen }, | |
246 { "orcc", { 0x1a, -0x1, -0x1, 0x1a }, INSTYPE_IMM8, 0, insn_gen }, | |
247 { "ord", { 0x109a, 0x10aa, 0x10ba, 0x108a }, INSTYPE_GEN, 0, insn_gen }, | |
248 { "orr", { 0x1035, -0x1, -0x1, -0x1 }, INSTYPE_RTOR, 0, insn_rtor }, | |
249 | |
250 { "pshs", { 0x34, -0x1, -0x1, -0x1 }, INSTYPE_RLIST, 0, insn_rlist }, | |
251 { "pshsw", { 0x1038, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
252 { "pshu", { 0x36, -0x1, -0x1, -0x1 }, INSTYPE_RLIST, 0, insn_rlist }, | |
253 { "pshuw", { 0x103a, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
254 { "puls", { 0x35, -0x1, -0x1, -0x1 }, INSTYPE_RLIST, 0, insn_rlist }, | |
255 { "pulsw", { 0x1039, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
256 { "pulu", { 0x37, -0x1, -0x1, -0x1 }, INSTYPE_RLIST, 0, insn_rlist }, | |
257 { "puluw", { 0x103b, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
258 | |
259 { "rol", { 0x09, 0x69, 0x79, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
260 { "rola", { 0x49, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
261 { "rolb", { 0x59, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
262 { "rold", { 0x1049, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
263 { "rolw", { 0x1059, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
264 { "ror", { 0x06, 0x66, 0x76, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
265 { "rora", { 0x46, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
266 { "rorb", { 0x56, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
267 { "rord", { 0x1046, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
268 { "rorw", { 0x1056, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
269 { "rti", { 0x3b, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
270 { "rts", { 0x39, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
271 | |
272 { "sbca", { 0x92, 0xa2, 0xb2, 0x82 }, INSTYPE_GEN8, 0, insn_gen }, | |
273 { "sbcb", { 0xd2, 0xe2, 0xf2, 0xc2 }, INSTYPE_GEN8, 0, insn_gen }, | |
274 { "sbcd", { 0x1092, 0x10a2, 0x10b2, 0x1082 }, INSTYPE_GEN, 0, insn_gen }, | |
275 { "sbcr", { 0x1033, -0x1, -0x1, -0x1 }, INSTYPE_RTOR, 0, insn_rtor }, | |
276 { "sex", { 0x1d, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
277 { "sexw", { 0x14, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
278 { "sta", { 0x97, 0xa7, 0xb7, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
279 { "stb", { 0xd7, 0xe7, 0xf7, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
280 { "stbt", { 0x1137, -0x1, -0x1, -0x1 }, INSTYPE_BITBIT, 0, insn_bitbit }, | |
281 { "std", { 0xdd, 0xed, 0xfd, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
282 { "ste", { 0x1197, 0x11a7, 0x11b7, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
283 { "stf", { 0x11d7, 0x11e7, 0x11f7, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
284 { "stq", { 0x10dd, 0x10ed, 0x10fd, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
285 { "sts", { 0x10df, 0x10ef, 0x10ff, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
286 { "stu", { 0xdf, 0xef, 0xff, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
287 { "stw", { 0x1097, 0x10a7, 0x10b7, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
288 { "stx", { 0x9f, 0xaf, 0xbf, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
289 { "sty", { 0x109f, 0x10af, 0x10bf, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
290 { "suba", { 0x90, 0xa0, 0xb0, 0x80 }, INSTYPE_GEN8, 0, insn_gen }, | |
291 { "subb", { 0xd0, 0xe0, 0xf0, 0xc0 }, INSTYPE_GEN8, 0, insn_gen }, | |
292 { "subd", { 0x93, 0xa3, 0xb3, 0x83 }, INSTYPE_GEN, 0, insn_gen }, | |
293 { "sube", { 0x1190, 0x11a0, 0x11b0, 0x1180 }, INSTYPE_GEN8, 0, insn_gen }, | |
294 { "subf", { 0x11d0, 0x11e0, 0x11f0, 0x11c0 }, INSTYPE_GEN8, 0, insn_gen }, | |
295 { "subr", { 0x1032, -0x1, -0x1, -0x1 }, INSTYPE_RTOR, 0, insn_rtor }, | |
296 { "subw", { 0x1090, 0x10a0, 0x1090, 0x1080 }, INSTYPE_GEN8, 0, insn_gen }, | |
297 { "swi", { 0x3f, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
298 { "swi2", { 0x103f, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
299 { "swi3", { 0x113f, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
300 { "sync", { 0x13, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
301 | |
302 // note: r+,r+ r-,r- r+,r r,r+ | |
303 { "tfm", { 0x1138, 0x1139, 0x113a, 0x113b }, INSTYPE_TFM, 0, insn_tfm }, | |
304 | |
305 { "tfr", { 0x1f, -0x1, -0x1, -0x1 }, INSTYPE_RTOR, 0, insn_rtor }, | |
306 { "tim", { 0x0b, 0x6b, 0x7b, -0x1 }, INSTYPE_LOGICMEM, 0, insn_logicmem }, | |
307 { "tst", { 0x0d, 0x6d, 0x7d, -0x1 }, INSTYPE_GENNOIMM, 0, insn_gen }, | |
308 { "tsta", { 0x4d, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
309 { "tstb", { 0x5d, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
310 { "tstd", { 0x104d, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
311 { "tste", { 0x114d, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
312 { "tstf", { 0x115d, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
313 { "tstw", { 0x105d, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh }, | |
314 | |
315 // pseudo ops are here | |
316 { "org", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_ORG, pseudo_org }, | |
317 { "equ", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_EQU, pseudo_equ }, | |
318 { "=", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_EQU, pseudo_equ }, | |
319 { "setdp", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_SETDP, pseudo_setdp }, | |
320 { "fcb", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_FCB, pseudo_fcb }, | |
321 { "fdb", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_FDB, pseudo_fdb }, | |
322 { "fqb", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_FQB, pseudo_fqb }, | |
323 { "fcc", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_FCC, pseudo_fcc }, | |
324 { "fcs", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_FCS, pseudo_fcs }, | |
325 { "fcn", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_FCN, pseudo_fcn }, | |
326 { "rmb", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_RMB, pseudo_rmb }, | |
327 { "align", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_ALIGN, pseudo_align }, | |
328 { "end", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_END, pseudo_end }, | |
329 { "include",{ -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_INCLUDE, pseudo_include }, | |
330 // { "absolute", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
331 // { "bsz", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
332 // { "byte", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_fcb }, | |
333 // { "cond", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_cond }, | |
334 // { "db", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_fcb }, | |
335 // { "ds", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_rmb }, | |
336 // { "dtb", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
337 // { "dts", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
338 // { "dw", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_fdb }, | |
339 // { "dword", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_fqb }, | |
340 { "else", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_ELSE, pseudo_else }, | |
341 // { "emod", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
342 { "endc", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_ENDC, pseudo_endc }, | |
343 { "endif", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_ENDC, pseudo_endc }, | |
344 // { "even", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
345 // { "fcr", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
346 // { "fill", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
347 // { "fzb", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
348 // { "fzd", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
349 // { "fzq", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
350 { "if", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_COND, pseudo_ifne }, | |
351 { "ifeq", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_COND, pseudo_ifeq }, | |
352 { "ifge", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_COND, pseudo_ifge }, | |
353 { "ifgt", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_COND, pseudo_ifgt }, | |
354 { "ifle", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_COND, pseudo_ifle }, | |
355 { "iflt", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_COND, pseudo_iflt }, | |
356 { "ifne", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_COND, pseudo_ifne }, | |
357 // { "ifp1", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
358 // { "ifp2", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
359 // { "lib", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
360 // { "mod", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
361 // { "nam", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
362 // { "name", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
363 // { "nam", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
364 // { "odd", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
365 // { "opt", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
366 // { "pag", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
367 // { "page", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
368 // { "page0", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
369 // { "page1", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
370 { "rmd", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_rmd }, | |
371 { "rmq", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_rmq }, | |
372 // { "set", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
373 // { "spc", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
374 // { "title", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
375 // { "ttl", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
376 // { "use", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
377 // { "word", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_fdb }, | |
378 { "zmb", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_zmb }, | |
379 { "zmd", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_zmd }, | |
380 { "zmq", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_zmq }, | |
381 | |
382 { "macro", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_MACRO, pseudo_macro }, | |
383 { "endm", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, SPECIAL_ENDM, pseudo_endm }, | |
384 // { "struct", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
385 // { "endstruct", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, NULL }, | |
386 | |
387 // { "namespace", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_namespace }, | |
388 // { "endnamespace", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_endnamespace }, | |
389 // { "endname", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_endnamespace }, | |
390 { "error", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_error }, | |
391 | |
392 { "set", { -1, -1, -1, -1 }, INSTYPE_PSEUDO, 0, pseudo_set }, | |
393 | |
394 { "pragma", { -1, -1, -1, -1}, INSTYPE_PSEUDO, 0, pseudo_pragma }, | |
395 { "*pragma", { -1, -1, -1, -1}, INSTYPE_PSEUDO, 0, pseudo_starpragma }, | |
396 | |
397 /* flag end of table */ | |
398 { NULL, { -0x1, -0x1, -0x1, -0x1 }, INSTYPE_INH, 0, insn_inh } | |
399 }; |