1 /* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */
2 /* CPU data for xstormy16.
4 THIS FILE IS MACHINE GENERATED WITH CGEN.
6 Copyright (C) 1996-2018 Free Software Foundation, Inc.
8 This file is part of the GNU Binutils and/or GDB, the GNU debugger.
10 This file is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3, or (at your option)
15 It is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18 License for more details.
20 You should have received a copy of the GNU General Public License along
21 with this program; if not, write to the Free Software Foundation, Inc.,
22 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
32 #include "xstormy16-desc.h"
33 #include "xstormy16-opc.h"
35 #include "libiberty.h"
40 static const CGEN_ATTR_ENTRY bool_attr
[] =
47 static const CGEN_ATTR_ENTRY MACH_attr
[] ATTRIBUTE_UNUSED
=
49 { "base", MACH_BASE
},
50 { "xstormy16", MACH_XSTORMY16
},
55 static const CGEN_ATTR_ENTRY ISA_attr
[] ATTRIBUTE_UNUSED
=
57 { "xstormy16", ISA_XSTORMY16
},
62 const CGEN_ATTR_TABLE xstormy16_cgen_ifield_attr_table
[] =
64 { "MACH", & MACH_attr
[0], & MACH_attr
[0] },
65 { "VIRTUAL", &bool_attr
[0], &bool_attr
[0] },
66 { "PCREL-ADDR", &bool_attr
[0], &bool_attr
[0] },
67 { "ABS-ADDR", &bool_attr
[0], &bool_attr
[0] },
68 { "RESERVED", &bool_attr
[0], &bool_attr
[0] },
69 { "SIGN-OPT", &bool_attr
[0], &bool_attr
[0] },
70 { "SIGNED", &bool_attr
[0], &bool_attr
[0] },
74 const CGEN_ATTR_TABLE xstormy16_cgen_hardware_attr_table
[] =
76 { "MACH", & MACH_attr
[0], & MACH_attr
[0] },
77 { "VIRTUAL", &bool_attr
[0], &bool_attr
[0] },
78 { "CACHE-ADDR", &bool_attr
[0], &bool_attr
[0] },
79 { "PC", &bool_attr
[0], &bool_attr
[0] },
80 { "PROFILE", &bool_attr
[0], &bool_attr
[0] },
84 const CGEN_ATTR_TABLE xstormy16_cgen_operand_attr_table
[] =
86 { "MACH", & MACH_attr
[0], & MACH_attr
[0] },
87 { "VIRTUAL", &bool_attr
[0], &bool_attr
[0] },
88 { "PCREL-ADDR", &bool_attr
[0], &bool_attr
[0] },
89 { "ABS-ADDR", &bool_attr
[0], &bool_attr
[0] },
90 { "SIGN-OPT", &bool_attr
[0], &bool_attr
[0] },
91 { "SIGNED", &bool_attr
[0], &bool_attr
[0] },
92 { "NEGATIVE", &bool_attr
[0], &bool_attr
[0] },
93 { "RELAX", &bool_attr
[0], &bool_attr
[0] },
94 { "SEM-ONLY", &bool_attr
[0], &bool_attr
[0] },
98 const CGEN_ATTR_TABLE xstormy16_cgen_insn_attr_table
[] =
100 { "MACH", & MACH_attr
[0], & MACH_attr
[0] },
101 { "ALIAS", &bool_attr
[0], &bool_attr
[0] },
102 { "VIRTUAL", &bool_attr
[0], &bool_attr
[0] },
103 { "UNCOND-CTI", &bool_attr
[0], &bool_attr
[0] },
104 { "COND-CTI", &bool_attr
[0], &bool_attr
[0] },
105 { "SKIP-CTI", &bool_attr
[0], &bool_attr
[0] },
106 { "DELAY-SLOT", &bool_attr
[0], &bool_attr
[0] },
107 { "RELAXABLE", &bool_attr
[0], &bool_attr
[0] },
108 { "RELAXED", &bool_attr
[0], &bool_attr
[0] },
109 { "NO-DIS", &bool_attr
[0], &bool_attr
[0] },
110 { "PBB", &bool_attr
[0], &bool_attr
[0] },
114 /* Instruction set variants. */
116 static const CGEN_ISA xstormy16_cgen_isa_table
[] = {
117 { "xstormy16", 32, 32, 16, 32 },
121 /* Machine variants. */
123 static const CGEN_MACH xstormy16_cgen_mach_table
[] = {
124 { "xstormy16", "xstormy16", MACH_XSTORMY16
, 16 },
128 static CGEN_KEYWORD_ENTRY xstormy16_cgen_opval_gr_names_entries
[] =
130 { "r0", 0, {0, {{{0, 0}}}}, 0, 0 },
131 { "r1", 1, {0, {{{0, 0}}}}, 0, 0 },
132 { "r2", 2, {0, {{{0, 0}}}}, 0, 0 },
133 { "r3", 3, {0, {{{0, 0}}}}, 0, 0 },
134 { "r4", 4, {0, {{{0, 0}}}}, 0, 0 },
135 { "r5", 5, {0, {{{0, 0}}}}, 0, 0 },
136 { "r6", 6, {0, {{{0, 0}}}}, 0, 0 },
137 { "r7", 7, {0, {{{0, 0}}}}, 0, 0 },
138 { "r8", 8, {0, {{{0, 0}}}}, 0, 0 },
139 { "r9", 9, {0, {{{0, 0}}}}, 0, 0 },
140 { "r10", 10, {0, {{{0, 0}}}}, 0, 0 },
141 { "r11", 11, {0, {{{0, 0}}}}, 0, 0 },
142 { "r12", 12, {0, {{{0, 0}}}}, 0, 0 },
143 { "r13", 13, {0, {{{0, 0}}}}, 0, 0 },
144 { "r14", 14, {0, {{{0, 0}}}}, 0, 0 },
145 { "r15", 15, {0, {{{0, 0}}}}, 0, 0 },
146 { "psw", 14, {0, {{{0, 0}}}}, 0, 0 },
147 { "sp", 15, {0, {{{0, 0}}}}, 0, 0 }
150 CGEN_KEYWORD xstormy16_cgen_opval_gr_names
=
152 & xstormy16_cgen_opval_gr_names_entries
[0],
157 static CGEN_KEYWORD_ENTRY xstormy16_cgen_opval_gr_Rb_names_entries
[] =
159 { "r8", 0, {0, {{{0, 0}}}}, 0, 0 },
160 { "r9", 1, {0, {{{0, 0}}}}, 0, 0 },
161 { "r10", 2, {0, {{{0, 0}}}}, 0, 0 },
162 { "r11", 3, {0, {{{0, 0}}}}, 0, 0 },
163 { "r12", 4, {0, {{{0, 0}}}}, 0, 0 },
164 { "r13", 5, {0, {{{0, 0}}}}, 0, 0 },
165 { "r14", 6, {0, {{{0, 0}}}}, 0, 0 },
166 { "r15", 7, {0, {{{0, 0}}}}, 0, 0 },
167 { "psw", 6, {0, {{{0, 0}}}}, 0, 0 },
168 { "sp", 7, {0, {{{0, 0}}}}, 0, 0 }
171 CGEN_KEYWORD xstormy16_cgen_opval_gr_Rb_names
=
173 & xstormy16_cgen_opval_gr_Rb_names_entries
[0],
178 static CGEN_KEYWORD_ENTRY xstormy16_cgen_opval_h_branchcond_entries
[] =
180 { "ge", 0, {0, {{{0, 0}}}}, 0, 0 },
181 { "nc", 1, {0, {{{0, 0}}}}, 0, 0 },
182 { "lt", 2, {0, {{{0, 0}}}}, 0, 0 },
183 { "c", 3, {0, {{{0, 0}}}}, 0, 0 },
184 { "gt", 4, {0, {{{0, 0}}}}, 0, 0 },
185 { "hi", 5, {0, {{{0, 0}}}}, 0, 0 },
186 { "le", 6, {0, {{{0, 0}}}}, 0, 0 },
187 { "ls", 7, {0, {{{0, 0}}}}, 0, 0 },
188 { "pl", 8, {0, {{{0, 0}}}}, 0, 0 },
189 { "nv", 9, {0, {{{0, 0}}}}, 0, 0 },
190 { "mi", 10, {0, {{{0, 0}}}}, 0, 0 },
191 { "v", 11, {0, {{{0, 0}}}}, 0, 0 },
192 { "nz.b", 12, {0, {{{0, 0}}}}, 0, 0 },
193 { "nz", 13, {0, {{{0, 0}}}}, 0, 0 },
194 { "z.b", 14, {0, {{{0, 0}}}}, 0, 0 },
195 { "z", 15, {0, {{{0, 0}}}}, 0, 0 }
198 CGEN_KEYWORD xstormy16_cgen_opval_h_branchcond
=
200 & xstormy16_cgen_opval_h_branchcond_entries
[0],
205 static CGEN_KEYWORD_ENTRY xstormy16_cgen_opval_h_wordsize_entries
[] =
207 { ".b", 0, {0, {{{0, 0}}}}, 0, 0 },
208 { ".w", 1, {0, {{{0, 0}}}}, 0, 0 },
209 { "", 1, {0, {{{0, 0}}}}, 0, 0 }
212 CGEN_KEYWORD xstormy16_cgen_opval_h_wordsize
=
214 & xstormy16_cgen_opval_h_wordsize_entries
[0],
220 /* The hardware table. */
222 #define A(a) (1 << CGEN_HW_##a)
224 const CGEN_HW_ENTRY xstormy16_cgen_hw_table
[] =
226 { "h-memory", HW_H_MEMORY
, CGEN_ASM_NONE
, 0, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
227 { "h-sint", HW_H_SINT
, CGEN_ASM_NONE
, 0, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
228 { "h-uint", HW_H_UINT
, CGEN_ASM_NONE
, 0, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
229 { "h-addr", HW_H_ADDR
, CGEN_ASM_NONE
, 0, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
230 { "h-iaddr", HW_H_IADDR
, CGEN_ASM_NONE
, 0, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
231 { "h-pc", HW_H_PC
, CGEN_ASM_NONE
, 0, { 0|A(PC
), { { { (1<<MACH_BASE
), 0 } } } } },
232 { "h-gr", HW_H_GR
, CGEN_ASM_KEYWORD
, (PTR
) & xstormy16_cgen_opval_gr_names
, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
233 { "h-Rb", HW_H_RB
, CGEN_ASM_KEYWORD
, (PTR
) & xstormy16_cgen_opval_gr_Rb_names
, { 0|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
234 { "h-Rbj", HW_H_RBJ
, CGEN_ASM_KEYWORD
, (PTR
) & xstormy16_cgen_opval_gr_Rb_names
, { 0|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
235 { "h-Rpsw", HW_H_RPSW
, CGEN_ASM_NONE
, 0, { 0|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
236 { "h-z8", HW_H_Z8
, CGEN_ASM_NONE
, 0, { 0|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
237 { "h-z16", HW_H_Z16
, CGEN_ASM_NONE
, 0, { 0|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
238 { "h-cy", HW_H_CY
, CGEN_ASM_NONE
, 0, { 0|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
239 { "h-hc", HW_H_HC
, CGEN_ASM_NONE
, 0, { 0|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
240 { "h-ov", HW_H_OV
, CGEN_ASM_NONE
, 0, { 0|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
241 { "h-pt", HW_H_PT
, CGEN_ASM_NONE
, 0, { 0|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
242 { "h-s", HW_H_S
, CGEN_ASM_NONE
, 0, { 0|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
243 { "h-branchcond", HW_H_BRANCHCOND
, CGEN_ASM_KEYWORD
, (PTR
) & xstormy16_cgen_opval_h_branchcond
, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
244 { "h-wordsize", HW_H_WORDSIZE
, CGEN_ASM_KEYWORD
, (PTR
) & xstormy16_cgen_opval_h_wordsize
, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
245 { 0, 0, CGEN_ASM_NONE
, 0, { 0, { { { (1<<MACH_BASE
), 0 } } } } }
251 /* The instruction field table. */
253 #define A(a) (1 << CGEN_IFLD_##a)
255 const CGEN_IFLD xstormy16_cgen_ifld_table
[] =
257 { XSTORMY16_F_NIL
, "f-nil", 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
258 { XSTORMY16_F_ANYOF
, "f-anyof", 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
259 { XSTORMY16_F_RD
, "f-Rd", 0, 32, 12, 4, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
260 { XSTORMY16_F_RDM
, "f-Rdm", 0, 32, 13, 3, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
261 { XSTORMY16_F_RM
, "f-Rm", 0, 32, 4, 3, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
262 { XSTORMY16_F_RS
, "f-Rs", 0, 32, 8, 4, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
263 { XSTORMY16_F_RB
, "f-Rb", 0, 32, 17, 3, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
264 { XSTORMY16_F_RBJ
, "f-Rbj", 0, 32, 11, 1, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
265 { XSTORMY16_F_OP1
, "f-op1", 0, 32, 0, 4, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
266 { XSTORMY16_F_OP2
, "f-op2", 0, 32, 4, 4, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
267 { XSTORMY16_F_OP2A
, "f-op2a", 0, 32, 4, 3, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
268 { XSTORMY16_F_OP2M
, "f-op2m", 0, 32, 7, 1, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
269 { XSTORMY16_F_OP3
, "f-op3", 0, 32, 8, 4, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
270 { XSTORMY16_F_OP3A
, "f-op3a", 0, 32, 8, 2, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
271 { XSTORMY16_F_OP3B
, "f-op3b", 0, 32, 8, 3, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
272 { XSTORMY16_F_OP4
, "f-op4", 0, 32, 12, 4, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
273 { XSTORMY16_F_OP4M
, "f-op4m", 0, 32, 12, 1, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
274 { XSTORMY16_F_OP4B
, "f-op4b", 0, 32, 15, 1, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
275 { XSTORMY16_F_OP5
, "f-op5", 0, 32, 16, 4, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
276 { XSTORMY16_F_OP5A
, "f-op5a", 0, 32, 16, 1, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
277 { XSTORMY16_F_OP
, "f-op", 0, 32, 0, 16, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
278 { XSTORMY16_F_IMM2
, "f-imm2", 0, 32, 10, 2, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
279 { XSTORMY16_F_IMM3
, "f-imm3", 0, 32, 4, 3, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
280 { XSTORMY16_F_IMM3B
, "f-imm3b", 0, 32, 17, 3, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
281 { XSTORMY16_F_IMM4
, "f-imm4", 0, 32, 8, 4, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
282 { XSTORMY16_F_IMM8
, "f-imm8", 0, 32, 8, 8, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
283 { XSTORMY16_F_IMM12
, "f-imm12", 0, 32, 20, 12, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
284 { XSTORMY16_F_IMM16
, "f-imm16", 0, 32, 16, 16, { 0|A(SIGN_OPT
), { { { (1<<MACH_BASE
), 0 } } } } },
285 { XSTORMY16_F_LMEM8
, "f-lmem8", 0, 32, 8, 8, { 0|A(ABS_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
286 { XSTORMY16_F_HMEM8
, "f-hmem8", 0, 32, 8, 8, { 0|A(ABS_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
287 { XSTORMY16_F_REL8_2
, "f-rel8-2", 0, 32, 8, 8, { 0|A(PCREL_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
288 { XSTORMY16_F_REL8_4
, "f-rel8-4", 0, 32, 8, 8, { 0|A(PCREL_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
289 { XSTORMY16_F_REL12
, "f-rel12", 0, 32, 20, 12, { 0|A(PCREL_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
290 { XSTORMY16_F_REL12A
, "f-rel12a", 0, 32, 4, 11, { 0|A(PCREL_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
291 { XSTORMY16_F_ABS24_1
, "f-abs24-1", 0, 32, 8, 8, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
292 { XSTORMY16_F_ABS24_2
, "f-abs24-2", 0, 32, 16, 16, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
293 { XSTORMY16_F_ABS24
, "f-abs24", 0, 0, 0, 0,{ 0|A(ABS_ADDR
)|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
294 { 0, 0, 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE
), 0 } } } } }
301 /* multi ifield declarations */
303 const CGEN_MAYBE_MULTI_IFLD XSTORMY16_F_ABS24_MULTI_IFIELD
[];
306 /* multi ifield definitions */
308 const CGEN_MAYBE_MULTI_IFLD XSTORMY16_F_ABS24_MULTI_IFIELD
[] =
310 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_ABS24_1
] } },
311 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_ABS24_2
] } },
312 { 0, { (const PTR
) 0 } }
315 /* The operand table. */
317 #define A(a) (1 << CGEN_OPERAND_##a)
318 #define OPERAND(op) XSTORMY16_OPERAND_##op
320 const CGEN_OPERAND xstormy16_cgen_operand_table
[] =
322 /* pc: program counter */
323 { "pc", XSTORMY16_OPERAND_PC
, HW_H_PC
, 0, 0,
324 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_NIL
] } },
325 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
327 { "psw-z8", XSTORMY16_OPERAND_PSW_Z8
, HW_H_Z8
, 0, 0,
328 { 0, { (const PTR
) 0 } },
329 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
331 { "psw-z16", XSTORMY16_OPERAND_PSW_Z16
, HW_H_Z16
, 0, 0,
332 { 0, { (const PTR
) 0 } },
333 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
335 { "psw-cy", XSTORMY16_OPERAND_PSW_CY
, HW_H_CY
, 0, 0,
336 { 0, { (const PTR
) 0 } },
337 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
339 { "psw-hc", XSTORMY16_OPERAND_PSW_HC
, HW_H_HC
, 0, 0,
340 { 0, { (const PTR
) 0 } },
341 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
343 { "psw-ov", XSTORMY16_OPERAND_PSW_OV
, HW_H_OV
, 0, 0,
344 { 0, { (const PTR
) 0 } },
345 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
347 { "psw-pt", XSTORMY16_OPERAND_PSW_PT
, HW_H_PT
, 0, 0,
348 { 0, { (const PTR
) 0 } },
349 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
351 { "psw-s", XSTORMY16_OPERAND_PSW_S
, HW_H_S
, 0, 0,
352 { 0, { (const PTR
) 0 } },
353 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
354 /* Rd: general register destination */
355 { "Rd", XSTORMY16_OPERAND_RD
, HW_H_GR
, 12, 4,
356 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_RD
] } },
357 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
358 /* Rdm: general register destination */
359 { "Rdm", XSTORMY16_OPERAND_RDM
, HW_H_GR
, 13, 3,
360 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_RDM
] } },
361 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
362 /* Rm: general register for memory */
363 { "Rm", XSTORMY16_OPERAND_RM
, HW_H_GR
, 4, 3,
364 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_RM
] } },
365 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
366 /* Rs: general register source */
367 { "Rs", XSTORMY16_OPERAND_RS
, HW_H_GR
, 8, 4,
368 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_RS
] } },
369 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
370 /* Rb: base register */
371 { "Rb", XSTORMY16_OPERAND_RB
, HW_H_RB
, 17, 3,
372 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_RB
] } },
373 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
374 /* Rbj: base register for jump */
375 { "Rbj", XSTORMY16_OPERAND_RBJ
, HW_H_RBJ
, 11, 1,
376 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_RBJ
] } },
377 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
378 /* bcond2: branch condition opcode */
379 { "bcond2", XSTORMY16_OPERAND_BCOND2
, HW_H_BRANCHCOND
, 4, 4,
380 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_OP2
] } },
381 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
382 /* ws2: word size opcode */
383 { "ws2", XSTORMY16_OPERAND_WS2
, HW_H_WORDSIZE
, 7, 1,
384 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_OP2M
] } },
385 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
386 /* bcond5: branch condition opcode */
387 { "bcond5", XSTORMY16_OPERAND_BCOND5
, HW_H_BRANCHCOND
, 16, 4,
388 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_OP5
] } },
389 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
390 /* imm2: 2 bit unsigned immediate */
391 { "imm2", XSTORMY16_OPERAND_IMM2
, HW_H_UINT
, 10, 2,
392 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_IMM2
] } },
393 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
394 /* imm3: 3 bit unsigned immediate */
395 { "imm3", XSTORMY16_OPERAND_IMM3
, HW_H_UINT
, 4, 3,
396 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_IMM3
] } },
397 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
398 /* imm3b: 3 bit unsigned immediate for bit tests */
399 { "imm3b", XSTORMY16_OPERAND_IMM3B
, HW_H_UINT
, 17, 3,
400 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_IMM3B
] } },
401 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
402 /* imm4: 4 bit unsigned immediate */
403 { "imm4", XSTORMY16_OPERAND_IMM4
, HW_H_UINT
, 8, 4,
404 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_IMM4
] } },
405 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
406 /* imm8: 8 bit unsigned immediate */
407 { "imm8", XSTORMY16_OPERAND_IMM8
, HW_H_UINT
, 8, 8,
408 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_IMM8
] } },
409 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
410 /* imm8small: 8 bit unsigned immediate */
411 { "imm8small", XSTORMY16_OPERAND_IMM8SMALL
, HW_H_UINT
, 8, 8,
412 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_IMM8
] } },
413 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
414 /* imm12: 12 bit signed immediate */
415 { "imm12", XSTORMY16_OPERAND_IMM12
, HW_H_SINT
, 20, 12,
416 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_IMM12
] } },
417 { 0, { { { (1<<MACH_BASE
), 0 } } } } },
418 /* imm16: 16 bit immediate */
419 { "imm16", XSTORMY16_OPERAND_IMM16
, HW_H_UINT
, 16, 16,
420 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_IMM16
] } },
421 { 0|A(SIGN_OPT
), { { { (1<<MACH_BASE
), 0 } } } } },
422 /* lmem8: 8 bit unsigned immediate low memory */
423 { "lmem8", XSTORMY16_OPERAND_LMEM8
, HW_H_UINT
, 8, 8,
424 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_LMEM8
] } },
425 { 0|A(ABS_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
426 /* hmem8: 8 bit unsigned immediate high memory */
427 { "hmem8", XSTORMY16_OPERAND_HMEM8
, HW_H_UINT
, 8, 8,
428 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_HMEM8
] } },
429 { 0|A(ABS_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
430 /* rel8-2: 8 bit relative address */
431 { "rel8-2", XSTORMY16_OPERAND_REL8_2
, HW_H_UINT
, 8, 8,
432 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_REL8_2
] } },
433 { 0|A(PCREL_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
434 /* rel8-4: 8 bit relative address */
435 { "rel8-4", XSTORMY16_OPERAND_REL8_4
, HW_H_UINT
, 8, 8,
436 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_REL8_4
] } },
437 { 0|A(PCREL_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
438 /* rel12: 12 bit relative address */
439 { "rel12", XSTORMY16_OPERAND_REL12
, HW_H_UINT
, 20, 12,
440 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_REL12
] } },
441 { 0|A(PCREL_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
442 /* rel12a: 12 bit relative address */
443 { "rel12a", XSTORMY16_OPERAND_REL12A
, HW_H_UINT
, 4, 11,
444 { 0, { (const PTR
) &xstormy16_cgen_ifld_table
[XSTORMY16_F_REL12A
] } },
445 { 0|A(PCREL_ADDR
), { { { (1<<MACH_BASE
), 0 } } } } },
446 /* abs24: 24 bit absolute address */
447 { "abs24", XSTORMY16_OPERAND_ABS24
, HW_H_UINT
, 8, 24,
448 { 2, { (const PTR
) &XSTORMY16_F_ABS24_MULTI_IFIELD
[0] } },
449 { 0|A(ABS_ADDR
)|A(VIRTUAL
), { { { (1<<MACH_BASE
), 0 } } } } },
450 /* psw: program status word */
451 { "psw", XSTORMY16_OPERAND_PSW
, HW_H_GR
, 0, 0,
452 { 0, { (const PTR
) 0 } },
453 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
454 /* Rpsw: N0-N3 of the program status word */
455 { "Rpsw", XSTORMY16_OPERAND_RPSW
, HW_H_RPSW
, 0, 0,
456 { 0, { (const PTR
) 0 } },
457 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
458 /* sp: stack pointer */
459 { "sp", XSTORMY16_OPERAND_SP
, HW_H_GR
, 0, 0,
460 { 0, { (const PTR
) 0 } },
461 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
463 { "R0", XSTORMY16_OPERAND_R0
, HW_H_GR
, 0, 0,
464 { 0, { (const PTR
) 0 } },
465 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
467 { "R1", XSTORMY16_OPERAND_R1
, HW_H_GR
, 0, 0,
468 { 0, { (const PTR
) 0 } },
469 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
471 { "R2", XSTORMY16_OPERAND_R2
, HW_H_GR
, 0, 0,
472 { 0, { (const PTR
) 0 } },
473 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
475 { "R8", XSTORMY16_OPERAND_R8
, HW_H_GR
, 0, 0,
476 { 0, { (const PTR
) 0 } },
477 { 0|A(SEM_ONLY
), { { { (1<<MACH_BASE
), 0 } } } } },
480 { 0, { (const PTR
) 0 } },
481 { 0, { { { (1<<MACH_BASE
), 0 } } } } }
487 /* The instruction table. */
489 #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
490 #define A(a) (1 << CGEN_INSN_##a)
492 static const CGEN_IBASE xstormy16_cgen_insn_table
[MAX_INSNS
] =
494 /* Special null first entry.
495 A `num' value of zero is thus invalid.
496 Also, the special `invalid' insn resides here. */
497 { 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE
), 0 } } } } },
498 /* mov$ws2 $lmem8,#$imm16 */
500 XSTORMY16_INSN_MOVLMEMIMM
, "movlmemimm", "mov", 32,
501 { 0, { { { (1<<MACH_BASE
), 0 } } } }
503 /* mov$ws2 $hmem8,#$imm16 */
505 XSTORMY16_INSN_MOVHMEMIMM
, "movhmemimm", "mov", 32,
506 { 0, { { { (1<<MACH_BASE
), 0 } } } }
508 /* mov$ws2 $Rm,$lmem8 */
510 XSTORMY16_INSN_MOVLGRMEM
, "movlgrmem", "mov", 16,
511 { 0, { { { (1<<MACH_BASE
), 0 } } } }
513 /* mov$ws2 $Rm,$hmem8 */
515 XSTORMY16_INSN_MOVHGRMEM
, "movhgrmem", "mov", 16,
516 { 0, { { { (1<<MACH_BASE
), 0 } } } }
518 /* mov$ws2 $lmem8,$Rm */
520 XSTORMY16_INSN_MOVLMEMGR
, "movlmemgr", "mov", 16,
521 { 0, { { { (1<<MACH_BASE
), 0 } } } }
523 /* mov$ws2 $hmem8,$Rm */
525 XSTORMY16_INSN_MOVHMEMGR
, "movhmemgr", "mov", 16,
526 { 0, { { { (1<<MACH_BASE
), 0 } } } }
528 /* mov$ws2 $Rdm,($Rs) */
530 XSTORMY16_INSN_MOVGRGRI
, "movgrgri", "mov", 16,
531 { 0, { { { (1<<MACH_BASE
), 0 } } } }
533 /* mov$ws2 $Rdm,($Rs++) */
535 XSTORMY16_INSN_MOVGRGRIPOSTINC
, "movgrgripostinc", "mov", 16,
536 { 0, { { { (1<<MACH_BASE
), 0 } } } }
538 /* mov$ws2 $Rdm,(--$Rs) */
540 XSTORMY16_INSN_MOVGRGRIPREDEC
, "movgrgripredec", "mov", 16,
541 { 0, { { { (1<<MACH_BASE
), 0 } } } }
543 /* mov$ws2 ($Rs),$Rdm */
545 XSTORMY16_INSN_MOVGRIGR
, "movgrigr", "mov", 16,
546 { 0, { { { (1<<MACH_BASE
), 0 } } } }
548 /* mov$ws2 ($Rs++),$Rdm */
550 XSTORMY16_INSN_MOVGRIPOSTINCGR
, "movgripostincgr", "mov", 16,
551 { 0, { { { (1<<MACH_BASE
), 0 } } } }
553 /* mov$ws2 (--$Rs),$Rdm */
555 XSTORMY16_INSN_MOVGRIPREDECGR
, "movgripredecgr", "mov", 16,
556 { 0, { { { (1<<MACH_BASE
), 0 } } } }
558 /* mov$ws2 $Rdm,($Rs,$imm12) */
560 XSTORMY16_INSN_MOVGRGRII
, "movgrgrii", "mov", 32,
561 { 0, { { { (1<<MACH_BASE
), 0 } } } }
563 /* mov$ws2 $Rdm,($Rs++,$imm12) */
565 XSTORMY16_INSN_MOVGRGRIIPOSTINC
, "movgrgriipostinc", "mov", 32,
566 { 0, { { { (1<<MACH_BASE
), 0 } } } }
568 /* mov$ws2 $Rdm,(--$Rs,$imm12) */
570 XSTORMY16_INSN_MOVGRGRIIPREDEC
, "movgrgriipredec", "mov", 32,
571 { 0, { { { (1<<MACH_BASE
), 0 } } } }
573 /* mov$ws2 ($Rs,$imm12),$Rdm */
575 XSTORMY16_INSN_MOVGRIIGR
, "movgriigr", "mov", 32,
576 { 0, { { { (1<<MACH_BASE
), 0 } } } }
578 /* mov$ws2 ($Rs++,$imm12),$Rdm */
580 XSTORMY16_INSN_MOVGRIIPOSTINCGR
, "movgriipostincgr", "mov", 32,
581 { 0, { { { (1<<MACH_BASE
), 0 } } } }
583 /* mov$ws2 (--$Rs,$imm12),$Rdm */
585 XSTORMY16_INSN_MOVGRIIPREDECGR
, "movgriipredecgr", "mov", 32,
586 { 0, { { { (1<<MACH_BASE
), 0 } } } }
590 XSTORMY16_INSN_MOVGRGR
, "movgrgr", "mov", 16,
591 { 0, { { { (1<<MACH_BASE
), 0 } } } }
593 /* mov.w Rx,#$imm8 */
595 XSTORMY16_INSN_MOVWIMM8
, "movwimm8", "mov.w", 16,
596 { 0, { { { (1<<MACH_BASE
), 0 } } } }
598 /* mov.w $Rm,#$imm8small */
600 XSTORMY16_INSN_MOVWGRIMM8
, "movwgrimm8", "mov.w", 16,
601 { 0, { { { (1<<MACH_BASE
), 0 } } } }
603 /* mov.w $Rd,#$imm16 */
605 XSTORMY16_INSN_MOVWGRIMM16
, "movwgrimm16", "mov.w", 32,
606 { 0, { { { (1<<MACH_BASE
), 0 } } } }
610 XSTORMY16_INSN_MOVLOWGR
, "movlowgr", "mov.b", 16,
611 { 0, { { { (1<<MACH_BASE
), 0 } } } }
615 XSTORMY16_INSN_MOVHIGHGR
, "movhighgr", "mov.b", 16,
616 { 0, { { { (1<<MACH_BASE
), 0 } } } }
618 /* movf$ws2 $Rdm,($Rs) */
620 XSTORMY16_INSN_MOVFGRGRI
, "movfgrgri", "movf", 16,
621 { 0, { { { (1<<MACH_BASE
), 0 } } } }
623 /* movf$ws2 $Rdm,($Rs++) */
625 XSTORMY16_INSN_MOVFGRGRIPOSTINC
, "movfgrgripostinc", "movf", 16,
626 { 0, { { { (1<<MACH_BASE
), 0 } } } }
628 /* movf$ws2 $Rdm,(--$Rs) */
630 XSTORMY16_INSN_MOVFGRGRIPREDEC
, "movfgrgripredec", "movf", 16,
631 { 0, { { { (1<<MACH_BASE
), 0 } } } }
633 /* movf$ws2 ($Rs),$Rdm */
635 XSTORMY16_INSN_MOVFGRIGR
, "movfgrigr", "movf", 16,
636 { 0, { { { (1<<MACH_BASE
), 0 } } } }
638 /* movf$ws2 ($Rs++),$Rdm */
640 XSTORMY16_INSN_MOVFGRIPOSTINCGR
, "movfgripostincgr", "movf", 16,
641 { 0, { { { (1<<MACH_BASE
), 0 } } } }
643 /* movf$ws2 (--$Rs),$Rdm */
645 XSTORMY16_INSN_MOVFGRIPREDECGR
, "movfgripredecgr", "movf", 16,
646 { 0, { { { (1<<MACH_BASE
), 0 } } } }
648 /* movf$ws2 $Rdm,($Rb,$Rs,$imm12) */
650 XSTORMY16_INSN_MOVFGRGRII
, "movfgrgrii", "movf", 32,
651 { 0, { { { (1<<MACH_BASE
), 0 } } } }
653 /* movf$ws2 $Rdm,($Rb,$Rs++,$imm12) */
655 XSTORMY16_INSN_MOVFGRGRIIPOSTINC
, "movfgrgriipostinc", "movf", 32,
656 { 0, { { { (1<<MACH_BASE
), 0 } } } }
658 /* movf$ws2 $Rdm,($Rb,--$Rs,$imm12) */
660 XSTORMY16_INSN_MOVFGRGRIIPREDEC
, "movfgrgriipredec", "movf", 32,
661 { 0, { { { (1<<MACH_BASE
), 0 } } } }
663 /* movf$ws2 ($Rb,$Rs,$imm12),$Rdm */
665 XSTORMY16_INSN_MOVFGRIIGR
, "movfgriigr", "movf", 32,
666 { 0, { { { (1<<MACH_BASE
), 0 } } } }
668 /* movf$ws2 ($Rb,$Rs++,$imm12),$Rdm */
670 XSTORMY16_INSN_MOVFGRIIPOSTINCGR
, "movfgriipostincgr", "movf", 32,
671 { 0, { { { (1<<MACH_BASE
), 0 } } } }
673 /* movf$ws2 ($Rb,--$Rs,$imm12),$Rdm */
675 XSTORMY16_INSN_MOVFGRIIPREDECGR
, "movfgriipredecgr", "movf", 32,
676 { 0, { { { (1<<MACH_BASE
), 0 } } } }
680 XSTORMY16_INSN_MASKGRGR
, "maskgrgr", "mask", 16,
681 { 0, { { { (1<<MACH_BASE
), 0 } } } }
683 /* mask $Rd,#$imm16 */
685 XSTORMY16_INSN_MASKGRIMM16
, "maskgrimm16", "mask", 32,
686 { 0, { { { (1<<MACH_BASE
), 0 } } } }
690 XSTORMY16_INSN_PUSHGR
, "pushgr", "push", 16,
691 { 0, { { { (1<<MACH_BASE
), 0 } } } }
695 XSTORMY16_INSN_POPGR
, "popgr", "pop", 16,
696 { 0, { { { (1<<MACH_BASE
), 0 } } } }
700 XSTORMY16_INSN_SWPN
, "swpn", "swpn", 16,
701 { 0, { { { (1<<MACH_BASE
), 0 } } } }
705 XSTORMY16_INSN_SWPB
, "swpb", "swpb", 16,
706 { 0, { { { (1<<MACH_BASE
), 0 } } } }
710 XSTORMY16_INSN_SWPW
, "swpw", "swpw", 16,
711 { 0, { { { (1<<MACH_BASE
), 0 } } } }
715 XSTORMY16_INSN_ANDGRGR
, "andgrgr", "and", 16,
716 { 0, { { { (1<<MACH_BASE
), 0 } } } }
720 XSTORMY16_INSN_ANDIMM8
, "andimm8", "and", 16,
721 { 0, { { { (1<<MACH_BASE
), 0 } } } }
723 /* and $Rd,#$imm16 */
725 XSTORMY16_INSN_ANDGRIMM16
, "andgrimm16", "and", 32,
726 { 0, { { { (1<<MACH_BASE
), 0 } } } }
730 XSTORMY16_INSN_ORGRGR
, "orgrgr", "or", 16,
731 { 0, { { { (1<<MACH_BASE
), 0 } } } }
735 XSTORMY16_INSN_ORIMM8
, "orimm8", "or", 16,
736 { 0, { { { (1<<MACH_BASE
), 0 } } } }
740 XSTORMY16_INSN_ORGRIMM16
, "orgrimm16", "or", 32,
741 { 0, { { { (1<<MACH_BASE
), 0 } } } }
745 XSTORMY16_INSN_XORGRGR
, "xorgrgr", "xor", 16,
746 { 0, { { { (1<<MACH_BASE
), 0 } } } }
750 XSTORMY16_INSN_XORIMM8
, "xorimm8", "xor", 16,
751 { 0, { { { (1<<MACH_BASE
), 0 } } } }
753 /* xor $Rd,#$imm16 */
755 XSTORMY16_INSN_XORGRIMM16
, "xorgrimm16", "xor", 32,
756 { 0, { { { (1<<MACH_BASE
), 0 } } } }
760 XSTORMY16_INSN_NOTGR
, "notgr", "not", 16,
761 { 0, { { { (1<<MACH_BASE
), 0 } } } }
765 XSTORMY16_INSN_ADDGRGR
, "addgrgr", "add", 16,
766 { 0, { { { (1<<MACH_BASE
), 0 } } } }
770 XSTORMY16_INSN_ADDGRIMM4
, "addgrimm4", "add", 16,
771 { 0, { { { (1<<MACH_BASE
), 0 } } } }
775 XSTORMY16_INSN_ADDIMM8
, "addimm8", "add", 16,
776 { 0, { { { (1<<MACH_BASE
), 0 } } } }
778 /* add $Rd,#$imm16 */
780 XSTORMY16_INSN_ADDGRIMM16
, "addgrimm16", "add", 32,
781 { 0, { { { (1<<MACH_BASE
), 0 } } } }
785 XSTORMY16_INSN_ADCGRGR
, "adcgrgr", "adc", 16,
786 { 0, { { { (1<<MACH_BASE
), 0 } } } }
790 XSTORMY16_INSN_ADCGRIMM4
, "adcgrimm4", "adc", 16,
791 { 0, { { { (1<<MACH_BASE
), 0 } } } }
795 XSTORMY16_INSN_ADCIMM8
, "adcimm8", "adc", 16,
796 { 0, { { { (1<<MACH_BASE
), 0 } } } }
798 /* adc $Rd,#$imm16 */
800 XSTORMY16_INSN_ADCGRIMM16
, "adcgrimm16", "adc", 32,
801 { 0, { { { (1<<MACH_BASE
), 0 } } } }
805 XSTORMY16_INSN_SUBGRGR
, "subgrgr", "sub", 16,
806 { 0, { { { (1<<MACH_BASE
), 0 } } } }
810 XSTORMY16_INSN_SUBGRIMM4
, "subgrimm4", "sub", 16,
811 { 0, { { { (1<<MACH_BASE
), 0 } } } }
815 XSTORMY16_INSN_SUBIMM8
, "subimm8", "sub", 16,
816 { 0, { { { (1<<MACH_BASE
), 0 } } } }
818 /* sub $Rd,#$imm16 */
820 XSTORMY16_INSN_SUBGRIMM16
, "subgrimm16", "sub", 32,
821 { 0, { { { (1<<MACH_BASE
), 0 } } } }
825 XSTORMY16_INSN_SBCGRGR
, "sbcgrgr", "sbc", 16,
826 { 0, { { { (1<<MACH_BASE
), 0 } } } }
830 XSTORMY16_INSN_SBCGRIMM4
, "sbcgrimm4", "sbc", 16,
831 { 0, { { { (1<<MACH_BASE
), 0 } } } }
835 XSTORMY16_INSN_SBCGRIMM8
, "sbcgrimm8", "sbc", 16,
836 { 0, { { { (1<<MACH_BASE
), 0 } } } }
838 /* sbc $Rd,#$imm16 */
840 XSTORMY16_INSN_SBCGRIMM16
, "sbcgrimm16", "sbc", 32,
841 { 0, { { { (1<<MACH_BASE
), 0 } } } }
845 XSTORMY16_INSN_INCGRIMM2
, "incgrimm2", "inc", 16,
846 { 0, { { { (1<<MACH_BASE
), 0 } } } }
850 XSTORMY16_INSN_DECGRIMM2
, "decgrimm2", "dec", 16,
851 { 0, { { { (1<<MACH_BASE
), 0 } } } }
855 XSTORMY16_INSN_RRCGRGR
, "rrcgrgr", "rrc", 16,
856 { 0, { { { (1<<MACH_BASE
), 0 } } } }
860 XSTORMY16_INSN_RRCGRIMM4
, "rrcgrimm4", "rrc", 16,
861 { 0, { { { (1<<MACH_BASE
), 0 } } } }
865 XSTORMY16_INSN_RLCGRGR
, "rlcgrgr", "rlc", 16,
866 { 0, { { { (1<<MACH_BASE
), 0 } } } }
870 XSTORMY16_INSN_RLCGRIMM4
, "rlcgrimm4", "rlc", 16,
871 { 0, { { { (1<<MACH_BASE
), 0 } } } }
875 XSTORMY16_INSN_SHRGRGR
, "shrgrgr", "shr", 16,
876 { 0, { { { (1<<MACH_BASE
), 0 } } } }
880 XSTORMY16_INSN_SHRGRIMM
, "shrgrimm", "shr", 16,
881 { 0, { { { (1<<MACH_BASE
), 0 } } } }
885 XSTORMY16_INSN_SHLGRGR
, "shlgrgr", "shl", 16,
886 { 0, { { { (1<<MACH_BASE
), 0 } } } }
890 XSTORMY16_INSN_SHLGRIMM
, "shlgrimm", "shl", 16,
891 { 0, { { { (1<<MACH_BASE
), 0 } } } }
895 XSTORMY16_INSN_ASRGRGR
, "asrgrgr", "asr", 16,
896 { 0, { { { (1<<MACH_BASE
), 0 } } } }
900 XSTORMY16_INSN_ASRGRIMM
, "asrgrimm", "asr", 16,
901 { 0, { { { (1<<MACH_BASE
), 0 } } } }
903 /* set1 $Rd,#$imm4 */
905 XSTORMY16_INSN_SET1GRIMM
, "set1grimm", "set1", 16,
906 { 0, { { { (1<<MACH_BASE
), 0 } } } }
910 XSTORMY16_INSN_SET1GRGR
, "set1grgr", "set1", 16,
911 { 0, { { { (1<<MACH_BASE
), 0 } } } }
913 /* set1 $lmem8,#$imm3 */
915 XSTORMY16_INSN_SET1LMEMIMM
, "set1lmemimm", "set1", 16,
916 { 0, { { { (1<<MACH_BASE
), 0 } } } }
918 /* set1 $hmem8,#$imm3 */
920 XSTORMY16_INSN_SET1HMEMIMM
, "set1hmemimm", "set1", 16,
921 { 0, { { { (1<<MACH_BASE
), 0 } } } }
923 /* clr1 $Rd,#$imm4 */
925 XSTORMY16_INSN_CLR1GRIMM
, "clr1grimm", "clr1", 16,
926 { 0, { { { (1<<MACH_BASE
), 0 } } } }
930 XSTORMY16_INSN_CLR1GRGR
, "clr1grgr", "clr1", 16,
931 { 0, { { { (1<<MACH_BASE
), 0 } } } }
933 /* clr1 $lmem8,#$imm3 */
935 XSTORMY16_INSN_CLR1LMEMIMM
, "clr1lmemimm", "clr1", 16,
936 { 0, { { { (1<<MACH_BASE
), 0 } } } }
938 /* clr1 $hmem8,#$imm3 */
940 XSTORMY16_INSN_CLR1HMEMIMM
, "clr1hmemimm", "clr1", 16,
941 { 0, { { { (1<<MACH_BASE
), 0 } } } }
945 XSTORMY16_INSN_CBWGR
, "cbwgr", "cbw", 16,
946 { 0, { { { (1<<MACH_BASE
), 0 } } } }
950 XSTORMY16_INSN_REVGR
, "revgr", "rev", 16,
951 { 0, { { { (1<<MACH_BASE
), 0 } } } }
953 /* b$bcond5 $Rd,$Rs,$rel12 */
955 XSTORMY16_INSN_BCCGRGR
, "bccgrgr", "b", 32,
956 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
958 /* b$bcond5 $Rm,#$imm8,$rel12 */
960 XSTORMY16_INSN_BCCGRIMM8
, "bccgrimm8", "b", 32,
961 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
963 /* b$bcond2 Rx,#$imm16,${rel8-4} */
965 XSTORMY16_INSN_BCCIMM16
, "bccimm16", "b", 32,
966 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
968 /* bn $Rd,#$imm4,$rel12 */
970 XSTORMY16_INSN_BNGRIMM4
, "bngrimm4", "bn", 32,
971 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
973 /* bn $Rd,$Rs,$rel12 */
975 XSTORMY16_INSN_BNGRGR
, "bngrgr", "bn", 32,
976 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
978 /* bn $lmem8,#$imm3b,$rel12 */
980 XSTORMY16_INSN_BNLMEMIMM
, "bnlmemimm", "bn", 32,
981 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
983 /* bn $hmem8,#$imm3b,$rel12 */
985 XSTORMY16_INSN_BNHMEMIMM
, "bnhmemimm", "bn", 32,
986 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
988 /* bp $Rd,#$imm4,$rel12 */
990 XSTORMY16_INSN_BPGRIMM4
, "bpgrimm4", "bp", 32,
991 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
993 /* bp $Rd,$Rs,$rel12 */
995 XSTORMY16_INSN_BPGRGR
, "bpgrgr", "bp", 32,
996 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
998 /* bp $lmem8,#$imm3b,$rel12 */
1000 XSTORMY16_INSN_BPLMEMIMM
, "bplmemimm", "bp", 32,
1001 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1003 /* bp $hmem8,#$imm3b,$rel12 */
1005 XSTORMY16_INSN_BPHMEMIMM
, "bphmemimm", "bp", 32,
1006 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1008 /* b$bcond2 ${rel8-2} */
1010 XSTORMY16_INSN_BCC
, "bcc", "b", 16,
1011 { 0|A(COND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1015 XSTORMY16_INSN_BGR
, "bgr", "br", 16,
1016 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1020 XSTORMY16_INSN_BR
, "br", "br", 16,
1021 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1025 XSTORMY16_INSN_JMP
, "jmp", "jmp", 16,
1026 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1030 XSTORMY16_INSN_JMPF
, "jmpf", "jmpf", 32,
1031 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1035 XSTORMY16_INSN_CALLRGR
, "callrgr", "callr", 16,
1036 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1040 XSTORMY16_INSN_CALLRIMM
, "callrimm", "callr", 16,
1041 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1045 XSTORMY16_INSN_CALLGR
, "callgr", "call", 16,
1046 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1050 XSTORMY16_INSN_CALLFIMM
, "callfimm", "callf", 32,
1051 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1055 XSTORMY16_INSN_ICALLRGR
, "icallrgr", "icallr", 16,
1056 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1058 /* icall $Rbj,$Rd */
1060 XSTORMY16_INSN_ICALLGR
, "icallgr", "icall", 16,
1061 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1065 XSTORMY16_INSN_ICALLFIMM
, "icallfimm", "icallf", 32,
1066 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1070 XSTORMY16_INSN_IRET
, "iret", "iret", 16,
1071 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1075 XSTORMY16_INSN_RET
, "ret", "ret", 16,
1076 { 0|A(UNCOND_CTI
), { { { (1<<MACH_BASE
), 0 } } } }
1080 XSTORMY16_INSN_MUL
, "mul", "mul", 16,
1081 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1085 XSTORMY16_INSN_DIV
, "div", "div", 16,
1086 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1090 XSTORMY16_INSN_SDIV
, "sdiv", "sdiv", 16,
1091 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1095 XSTORMY16_INSN_SDIVLH
, "sdivlh", "sdivlh", 16,
1096 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1100 XSTORMY16_INSN_DIVLH
, "divlh", "divlh", 16,
1101 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1105 XSTORMY16_INSN_RESET
, "reset", "reset", 16,
1106 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1110 XSTORMY16_INSN_NOP
, "nop", "nop", 16,
1111 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1115 XSTORMY16_INSN_HALT
, "halt", "halt", 16,
1116 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1120 XSTORMY16_INSN_HOLD
, "hold", "hold", 16,
1121 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1125 XSTORMY16_INSN_HOLDX
, "holdx", "holdx", 16,
1126 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1130 XSTORMY16_INSN_BRK
, "brk", "brk", 16,
1131 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1135 XSTORMY16_INSN_SYSCALL
, "syscall", "--unused--", 16,
1136 { 0, { { { (1<<MACH_BASE
), 0 } } } }
1143 /* Initialize anything needed to be done once, before any cpu_open call. */
1150 #ifndef opcodes_error_handler
1151 #define opcodes_error_handler(...) \
1152 fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
1155 static const CGEN_MACH
* lookup_mach_via_bfd_name (const CGEN_MACH
*, const char *);
1156 static void build_hw_table (CGEN_CPU_TABLE
*);
1157 static void build_ifield_table (CGEN_CPU_TABLE
*);
1158 static void build_operand_table (CGEN_CPU_TABLE
*);
1159 static void build_insn_table (CGEN_CPU_TABLE
*);
1160 static void xstormy16_cgen_rebuild_tables (CGEN_CPU_TABLE
*);
1162 /* Subroutine of xstormy16_cgen_cpu_open to look up a mach via its bfd name. */
1164 static const CGEN_MACH
*
1165 lookup_mach_via_bfd_name (const CGEN_MACH
*table
, const char *name
)
1169 if (strcmp (name
, table
->bfd_name
) == 0)
1176 /* Subroutine of xstormy16_cgen_cpu_open to build the hardware table. */
1179 build_hw_table (CGEN_CPU_TABLE
*cd
)
1182 int machs
= cd
->machs
;
1183 const CGEN_HW_ENTRY
*init
= & xstormy16_cgen_hw_table
[0];
1184 /* MAX_HW is only an upper bound on the number of selected entries.
1185 However each entry is indexed by it's enum so there can be holes in
1187 const CGEN_HW_ENTRY
**selected
=
1188 (const CGEN_HW_ENTRY
**) xmalloc (MAX_HW
* sizeof (CGEN_HW_ENTRY
*));
1190 cd
->hw_table
.init_entries
= init
;
1191 cd
->hw_table
.entry_size
= sizeof (CGEN_HW_ENTRY
);
1192 memset (selected
, 0, MAX_HW
* sizeof (CGEN_HW_ENTRY
*));
1193 /* ??? For now we just use machs to determine which ones we want. */
1194 for (i
= 0; init
[i
].name
!= NULL
; ++i
)
1195 if (CGEN_HW_ATTR_VALUE (&init
[i
], CGEN_HW_MACH
)
1197 selected
[init
[i
].type
] = &init
[i
];
1198 cd
->hw_table
.entries
= selected
;
1199 cd
->hw_table
.num_entries
= MAX_HW
;
1202 /* Subroutine of xstormy16_cgen_cpu_open to build the hardware table. */
1205 build_ifield_table (CGEN_CPU_TABLE
*cd
)
1207 cd
->ifld_table
= & xstormy16_cgen_ifld_table
[0];
1210 /* Subroutine of xstormy16_cgen_cpu_open to build the hardware table. */
1213 build_operand_table (CGEN_CPU_TABLE
*cd
)
1216 int machs
= cd
->machs
;
1217 const CGEN_OPERAND
*init
= & xstormy16_cgen_operand_table
[0];
1218 /* MAX_OPERANDS is only an upper bound on the number of selected entries.
1219 However each entry is indexed by it's enum so there can be holes in
1221 const CGEN_OPERAND
**selected
= xmalloc (MAX_OPERANDS
* sizeof (* selected
));
1223 cd
->operand_table
.init_entries
= init
;
1224 cd
->operand_table
.entry_size
= sizeof (CGEN_OPERAND
);
1225 memset (selected
, 0, MAX_OPERANDS
* sizeof (CGEN_OPERAND
*));
1226 /* ??? For now we just use mach to determine which ones we want. */
1227 for (i
= 0; init
[i
].name
!= NULL
; ++i
)
1228 if (CGEN_OPERAND_ATTR_VALUE (&init
[i
], CGEN_OPERAND_MACH
)
1230 selected
[init
[i
].type
] = &init
[i
];
1231 cd
->operand_table
.entries
= selected
;
1232 cd
->operand_table
.num_entries
= MAX_OPERANDS
;
1235 /* Subroutine of xstormy16_cgen_cpu_open to build the hardware table.
1236 ??? This could leave out insns not supported by the specified mach/isa,
1237 but that would cause errors like "foo only supported by bar" to become
1238 "unknown insn", so for now we include all insns and require the app to
1239 do the checking later.
1240 ??? On the other hand, parsing of such insns may require their hardware or
1241 operand elements to be in the table [which they mightn't be]. */
1244 build_insn_table (CGEN_CPU_TABLE
*cd
)
1247 const CGEN_IBASE
*ib
= & xstormy16_cgen_insn_table
[0];
1248 CGEN_INSN
*insns
= xmalloc (MAX_INSNS
* sizeof (CGEN_INSN
));
1250 memset (insns
, 0, MAX_INSNS
* sizeof (CGEN_INSN
));
1251 for (i
= 0; i
< MAX_INSNS
; ++i
)
1252 insns
[i
].base
= &ib
[i
];
1253 cd
->insn_table
.init_entries
= insns
;
1254 cd
->insn_table
.entry_size
= sizeof (CGEN_IBASE
);
1255 cd
->insn_table
.num_init_entries
= MAX_INSNS
;
1258 /* Subroutine of xstormy16_cgen_cpu_open to rebuild the tables. */
1261 xstormy16_cgen_rebuild_tables (CGEN_CPU_TABLE
*cd
)
1264 CGEN_BITSET
*isas
= cd
->isas
;
1265 unsigned int machs
= cd
->machs
;
1267 cd
->int_insn_p
= CGEN_INT_INSN_P
;
1269 /* Data derived from the isa spec. */
1270 #define UNSET (CGEN_SIZE_UNKNOWN + 1)
1271 cd
->default_insn_bitsize
= UNSET
;
1272 cd
->base_insn_bitsize
= UNSET
;
1273 cd
->min_insn_bitsize
= 65535; /* Some ridiculously big number. */
1274 cd
->max_insn_bitsize
= 0;
1275 for (i
= 0; i
< MAX_ISAS
; ++i
)
1276 if (cgen_bitset_contains (isas
, i
))
1278 const CGEN_ISA
*isa
= & xstormy16_cgen_isa_table
[i
];
1280 /* Default insn sizes of all selected isas must be
1281 equal or we set the result to 0, meaning "unknown". */
1282 if (cd
->default_insn_bitsize
== UNSET
)
1283 cd
->default_insn_bitsize
= isa
->default_insn_bitsize
;
1284 else if (isa
->default_insn_bitsize
== cd
->default_insn_bitsize
)
1287 cd
->default_insn_bitsize
= CGEN_SIZE_UNKNOWN
;
1289 /* Base insn sizes of all selected isas must be equal
1290 or we set the result to 0, meaning "unknown". */
1291 if (cd
->base_insn_bitsize
== UNSET
)
1292 cd
->base_insn_bitsize
= isa
->base_insn_bitsize
;
1293 else if (isa
->base_insn_bitsize
== cd
->base_insn_bitsize
)
1296 cd
->base_insn_bitsize
= CGEN_SIZE_UNKNOWN
;
1298 /* Set min,max insn sizes. */
1299 if (isa
->min_insn_bitsize
< cd
->min_insn_bitsize
)
1300 cd
->min_insn_bitsize
= isa
->min_insn_bitsize
;
1301 if (isa
->max_insn_bitsize
> cd
->max_insn_bitsize
)
1302 cd
->max_insn_bitsize
= isa
->max_insn_bitsize
;
1305 /* Data derived from the mach spec. */
1306 for (i
= 0; i
< MAX_MACHS
; ++i
)
1307 if (((1 << i
) & machs
) != 0)
1309 const CGEN_MACH
*mach
= & xstormy16_cgen_mach_table
[i
];
1311 if (mach
->insn_chunk_bitsize
!= 0)
1313 if (cd
->insn_chunk_bitsize
!= 0 && cd
->insn_chunk_bitsize
!= mach
->insn_chunk_bitsize
)
1315 opcodes_error_handler
1316 (/* xgettext:c-format */
1317 _("internal error: xstormy16_cgen_rebuild_tables: "
1318 "conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
1319 cd
->insn_chunk_bitsize
, mach
->insn_chunk_bitsize
);
1323 cd
->insn_chunk_bitsize
= mach
->insn_chunk_bitsize
;
1327 /* Determine which hw elements are used by MACH. */
1328 build_hw_table (cd
);
1330 /* Build the ifield table. */
1331 build_ifield_table (cd
);
1333 /* Determine which operands are used by MACH/ISA. */
1334 build_operand_table (cd
);
1336 /* Build the instruction table. */
1337 build_insn_table (cd
);
1340 /* Initialize a cpu table and return a descriptor.
1341 It's much like opening a file, and must be the first function called.
1342 The arguments are a set of (type/value) pairs, terminated with
1345 Currently supported values:
1346 CGEN_CPU_OPEN_ISAS: bitmap of values in enum isa_attr
1347 CGEN_CPU_OPEN_MACHS: bitmap of values in enum mach_attr
1348 CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name
1349 CGEN_CPU_OPEN_ENDIAN: specify endian choice
1350 CGEN_CPU_OPEN_END: terminates arguments
1352 ??? Simultaneous multiple isas might not make sense, but it's not (yet)
1356 xstormy16_cgen_cpu_open (enum cgen_cpu_open_arg arg_type
, ...)
1358 CGEN_CPU_TABLE
*cd
= (CGEN_CPU_TABLE
*) xmalloc (sizeof (CGEN_CPU_TABLE
));
1360 CGEN_BITSET
*isas
= 0; /* 0 = "unspecified" */
1361 unsigned int machs
= 0; /* 0 = "unspecified" */
1362 enum cgen_endian endian
= CGEN_ENDIAN_UNKNOWN
;
1371 memset (cd
, 0, sizeof (*cd
));
1373 va_start (ap
, arg_type
);
1374 while (arg_type
!= CGEN_CPU_OPEN_END
)
1378 case CGEN_CPU_OPEN_ISAS
:
1379 isas
= va_arg (ap
, CGEN_BITSET
*);
1381 case CGEN_CPU_OPEN_MACHS
:
1382 machs
= va_arg (ap
, unsigned int);
1384 case CGEN_CPU_OPEN_BFDMACH
:
1386 const char *name
= va_arg (ap
, const char *);
1387 const CGEN_MACH
*mach
=
1388 lookup_mach_via_bfd_name (xstormy16_cgen_mach_table
, name
);
1391 machs
|= 1 << mach
->num
;
1394 case CGEN_CPU_OPEN_ENDIAN
:
1395 endian
= va_arg (ap
, enum cgen_endian
);
1398 opcodes_error_handler
1399 (/* xgettext:c-format */
1400 _("internal error: xstormy16_cgen_cpu_open: "
1401 "unsupported argument `%d'"),
1403 abort (); /* ??? return NULL? */
1405 arg_type
= va_arg (ap
, enum cgen_cpu_open_arg
);
1409 /* Mach unspecified means "all". */
1411 machs
= (1 << MAX_MACHS
) - 1;
1412 /* Base mach is always selected. */
1414 if (endian
== CGEN_ENDIAN_UNKNOWN
)
1416 /* ??? If target has only one, could have a default. */
1417 opcodes_error_handler
1418 (/* xgettext:c-format */
1419 _("internal error: xstormy16_cgen_cpu_open: no endianness specified"));
1423 cd
->isas
= cgen_bitset_copy (isas
);
1425 cd
->endian
= endian
;
1426 /* FIXME: for the sparc case we can determine insn-endianness statically.
1427 The worry here is where both data and insn endian can be independently
1428 chosen, in which case this function will need another argument.
1429 Actually, will want to allow for more arguments in the future anyway. */
1430 cd
->insn_endian
= endian
;
1432 /* Table (re)builder. */
1433 cd
->rebuild_tables
= xstormy16_cgen_rebuild_tables
;
1434 xstormy16_cgen_rebuild_tables (cd
);
1436 /* Default to not allowing signed overflow. */
1437 cd
->signed_overflow_ok_p
= 0;
1439 return (CGEN_CPU_DESC
) cd
;
1442 /* Cover fn to xstormy16_cgen_cpu_open to handle the simple case of 1 isa, 1 mach.
1443 MACH_NAME is the bfd name of the mach. */
1446 xstormy16_cgen_cpu_open_1 (const char *mach_name
, enum cgen_endian endian
)
1448 return xstormy16_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH
, mach_name
,
1449 CGEN_CPU_OPEN_ENDIAN
, endian
,
1453 /* Close a cpu table.
1454 ??? This can live in a machine independent file, but there's currently
1455 no place to put this file (there's no libcgen). libopcodes is the wrong
1456 place as some simulator ports use this but they don't use libopcodes. */
1459 xstormy16_cgen_cpu_close (CGEN_CPU_DESC cd
)
1462 const CGEN_INSN
*insns
;
1464 if (cd
->macro_insn_table
.init_entries
)
1466 insns
= cd
->macro_insn_table
.init_entries
;
1467 for (i
= 0; i
< cd
->macro_insn_table
.num_init_entries
; ++i
, ++insns
)
1468 if (CGEN_INSN_RX ((insns
)))
1469 regfree (CGEN_INSN_RX (insns
));
1472 if (cd
->insn_table
.init_entries
)
1474 insns
= cd
->insn_table
.init_entries
;
1475 for (i
= 0; i
< cd
->insn_table
.num_init_entries
; ++i
, ++insns
)
1476 if (CGEN_INSN_RX (insns
))
1477 regfree (CGEN_INSN_RX (insns
));
1480 if (cd
->macro_insn_table
.init_entries
)
1481 free ((CGEN_INSN
*) cd
->macro_insn_table
.init_entries
);
1483 if (cd
->insn_table
.init_entries
)
1484 free ((CGEN_INSN
*) cd
->insn_table
.init_entries
);
1486 if (cd
->hw_table
.entries
)
1487 free ((CGEN_HW_ENTRY
*) cd
->hw_table
.entries
);
1489 if (cd
->operand_table
.entries
)
1490 free ((CGEN_HW_ENTRY
*) cd
->operand_table
.entries
);