Honour software single step in fallback of displaced stepping
[deliverable/binutils-gdb.git] / opcodes / lm32-opinst.c
CommitLineData
84e94c90
NC
1/* Semantic operand instances for lm32.
2
3THIS FILE IS MACHINE GENERATED WITH CGEN.
4
b90efa5b 5Copyright (C) 1996-2015 Free Software Foundation, Inc.
84e94c90
NC
6
7This file is part of the GNU Binutils and/or GDB, the GNU debugger.
8
9 This file is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
12 any later version.
13
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
18
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
22
23*/
24
25#include "sysdep.h"
26#include "ansidecl.h"
27#include "bfd.h"
28#include "symcat.h"
29#include "lm32-desc.h"
30#include "lm32-opc.h"
31
32/* Operand references. */
33
84e94c90 34#define OP_ENT(op) LM32_OPERAND_##op
84e94c90
NC
35#define INPUT CGEN_OPINST_INPUT
36#define OUTPUT CGEN_OPINST_OUTPUT
37#define END CGEN_OPINST_END
38#define COND_REF CGEN_OPINST_COND_REF
39
40static const CGEN_OPINST sfmt_empty_ops[] ATTRIBUTE_UNUSED = {
41 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
42};
43
44static const CGEN_OPINST sfmt_add_ops[] ATTRIBUTE_UNUSED = {
45 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
46 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
47 { OUTPUT, "r2", HW_H_GR, CGEN_MODE_SI, OP_ENT (R2), 0, 0 },
48 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
49};
50
51static const CGEN_OPINST sfmt_addi_ops[] ATTRIBUTE_UNUSED = {
52 { INPUT, "imm", HW_H_SINT, CGEN_MODE_INT, OP_ENT (IMM), 0, 0 },
53 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
54 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
55 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
56};
57
58static const CGEN_OPINST sfmt_andi_ops[] ATTRIBUTE_UNUSED = {
59 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
60 { INPUT, "uimm", HW_H_UINT, CGEN_MODE_UINT, OP_ENT (UIMM), 0, 0 },
61 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
62 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
63};
64
65static const CGEN_OPINST sfmt_andhii_ops[] ATTRIBUTE_UNUSED = {
cedb97b6 66 { INPUT, "hi16", HW_H_UINT, CGEN_MODE_UINT, OP_ENT (HI16), 0, 0 },
84e94c90
NC
67 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
68 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
69 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
70};
71
72static const CGEN_OPINST sfmt_b_ops[] ATTRIBUTE_UNUSED = {
73 { INPUT, "f_r0", HW_H_UINT, CGEN_MODE_UINT, 0, 0, 0 },
74 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
75 { OUTPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
76 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
77};
78
79static const CGEN_OPINST sfmt_bi_ops[] ATTRIBUTE_UNUSED = {
80 { INPUT, "call", HW_H_IADDR, CGEN_MODE_USI, OP_ENT (CALL), 0, 0 },
81 { OUTPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
82 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
83};
84
85static const CGEN_OPINST sfmt_be_ops[] ATTRIBUTE_UNUSED = {
86 { INPUT, "branch", HW_H_IADDR, CGEN_MODE_USI, OP_ENT (BRANCH), 0, COND_REF },
87 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
88 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
89 { OUTPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, COND_REF },
90 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
91};
92
93static const CGEN_OPINST sfmt_call_ops[] ATTRIBUTE_UNUSED = {
94 { INPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
95 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
96 { OUTPUT, "h_gr_SI_29", HW_H_GR, CGEN_MODE_SI, 0, 29, 0 },
97 { OUTPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
98 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
99};
100
101static const CGEN_OPINST sfmt_calli_ops[] ATTRIBUTE_UNUSED = {
102 { INPUT, "call", HW_H_IADDR, CGEN_MODE_USI, OP_ENT (CALL), 0, 0 },
103 { INPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
104 { OUTPUT, "h_gr_SI_29", HW_H_GR, CGEN_MODE_SI, 0, 29, 0 },
105 { OUTPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
106 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
107};
108
109static const CGEN_OPINST sfmt_divu_ops[] ATTRIBUTE_UNUSED = {
110 { INPUT, "f_r0", HW_H_UINT, CGEN_MODE_UINT, 0, 0, 0 },
111 { INPUT, "f_r1", HW_H_UINT, CGEN_MODE_UINT, 0, 0, 0 },
112 { INPUT, "f_r2", HW_H_UINT, CGEN_MODE_UINT, 0, 0, 0 },
113 { INPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
114 { OUTPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
115 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
116};
117
118static const CGEN_OPINST sfmt_lb_ops[] ATTRIBUTE_UNUSED = {
cedb97b6 119 { INPUT, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 },
84e94c90
NC
120 { INPUT, "imm", HW_H_SINT, CGEN_MODE_INT, OP_ENT (IMM), 0, 0 },
121 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
122 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
123 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
124};
125
126static const CGEN_OPINST sfmt_lh_ops[] ATTRIBUTE_UNUSED = {
cedb97b6 127 { INPUT, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 },
84e94c90
NC
128 { INPUT, "imm", HW_H_SINT, CGEN_MODE_INT, OP_ENT (IMM), 0, 0 },
129 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
130 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
131 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
132};
133
134static const CGEN_OPINST sfmt_lw_ops[] ATTRIBUTE_UNUSED = {
cedb97b6 135 { INPUT, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
84e94c90
NC
136 { INPUT, "imm", HW_H_SINT, CGEN_MODE_INT, OP_ENT (IMM), 0, 0 },
137 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
138 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
139 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
140};
141
142static const CGEN_OPINST sfmt_ori_ops[] ATTRIBUTE_UNUSED = {
143 { INPUT, "lo16", HW_H_UINT, CGEN_MODE_UINT, OP_ENT (LO16), 0, 0 },
144 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
145 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
146 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
147};
148
149static const CGEN_OPINST sfmt_rcsr_ops[] ATTRIBUTE_UNUSED = {
150 { INPUT, "csr", HW_H_CSR, CGEN_MODE_SI, OP_ENT (CSR), 0, 0 },
151 { OUTPUT, "r2", HW_H_GR, CGEN_MODE_SI, OP_ENT (R2), 0, 0 },
152 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
153};
154
155static const CGEN_OPINST sfmt_sb_ops[] ATTRIBUTE_UNUSED = {
156 { INPUT, "imm", HW_H_SINT, CGEN_MODE_INT, OP_ENT (IMM), 0, 0 },
157 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
158 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
cedb97b6 159 { OUTPUT, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 },
84e94c90
NC
160 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
161};
162
163static const CGEN_OPINST sfmt_sextb_ops[] ATTRIBUTE_UNUSED = {
164 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
165 { OUTPUT, "r2", HW_H_GR, CGEN_MODE_SI, OP_ENT (R2), 0, 0 },
166 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
167};
168
169static const CGEN_OPINST sfmt_sh_ops[] ATTRIBUTE_UNUSED = {
170 { INPUT, "imm", HW_H_SINT, CGEN_MODE_INT, OP_ENT (IMM), 0, 0 },
171 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
172 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
cedb97b6 173 { OUTPUT, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 },
84e94c90
NC
174 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
175};
176
177static const CGEN_OPINST sfmt_sw_ops[] ATTRIBUTE_UNUSED = {
178 { INPUT, "imm", HW_H_SINT, CGEN_MODE_INT, OP_ENT (IMM), 0, 0 },
179 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
180 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
cedb97b6 181 { OUTPUT, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
84e94c90
NC
182 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
183};
184
185static const CGEN_OPINST sfmt_user_ops[] ATTRIBUTE_UNUSED = {
186 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
187 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
188 { INPUT, "user", HW_H_UINT, CGEN_MODE_UINT, OP_ENT (USER), 0, 0 },
189 { OUTPUT, "r2", HW_H_GR, CGEN_MODE_SI, OP_ENT (R2), 0, 0 },
190 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
191};
192
193static const CGEN_OPINST sfmt_wcsr_ops[] ATTRIBUTE_UNUSED = {
194 { INPUT, "f_csr", HW_H_UINT, CGEN_MODE_UINT, 0, 0, 0 },
195 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
196 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
197};
198
199static const CGEN_OPINST sfmt_break_ops[] ATTRIBUTE_UNUSED = {
200 { INPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
201 { OUTPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
202 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
203};
204
205static const CGEN_OPINST sfmt_bret_ops[] ATTRIBUTE_UNUSED = {
206 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
207 { OUTPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
208 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
209};
210
fee1d3e8
DE
211static const CGEN_OPINST sfmt_mvi_ops[] ATTRIBUTE_UNUSED = {
212 { INPUT, "imm", HW_H_SINT, CGEN_MODE_INT, OP_ENT (IMM), 0, 0 },
213 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
214 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
215 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
216};
217
84e94c90
NC
218static const CGEN_OPINST sfmt_mvui_ops[] ATTRIBUTE_UNUSED = {
219 { INPUT, "lo16", HW_H_UINT, CGEN_MODE_UINT, OP_ENT (LO16), 0, 0 },
220 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
221 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
222};
223
fee1d3e8
DE
224static const CGEN_OPINST sfmt_mvhi_ops[] ATTRIBUTE_UNUSED = {
225 { INPUT, "hi16", HW_H_UINT, CGEN_MODE_UINT, OP_ENT (HI16), 0, 0 },
226 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
227 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
228 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
229};
230
84e94c90
NC
231static const CGEN_OPINST sfmt_mva_ops[] ATTRIBUTE_UNUSED = {
232 { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
233 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
234 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
235 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
236};
237
238static const CGEN_OPINST sfmt_nop_ops[] ATTRIBUTE_UNUSED = {
239 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
240 { OUTPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
241 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
242};
243
244static const CGEN_OPINST sfmt_lbgprel_ops[] ATTRIBUTE_UNUSED = {
245 { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
cedb97b6 246 { INPUT, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 },
84e94c90
NC
247 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
248 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
249 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
250};
251
252static const CGEN_OPINST sfmt_lhgprel_ops[] ATTRIBUTE_UNUSED = {
253 { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
cedb97b6 254 { INPUT, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 },
84e94c90
NC
255 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
256 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
257 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
258};
259
260static const CGEN_OPINST sfmt_lwgprel_ops[] ATTRIBUTE_UNUSED = {
261 { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
cedb97b6 262 { INPUT, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
84e94c90
NC
263 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
264 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
265 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
266};
267
268static const CGEN_OPINST sfmt_sbgprel_ops[] ATTRIBUTE_UNUSED = {
269 { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
270 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
271 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
cedb97b6 272 { OUTPUT, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 },
84e94c90
NC
273 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
274};
275
276static const CGEN_OPINST sfmt_shgprel_ops[] ATTRIBUTE_UNUSED = {
277 { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
278 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
279 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
cedb97b6 280 { OUTPUT, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 },
84e94c90
NC
281 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
282};
283
284static const CGEN_OPINST sfmt_swgprel_ops[] ATTRIBUTE_UNUSED = {
285 { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
286 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
287 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
cedb97b6 288 { OUTPUT, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
84e94c90
NC
289 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
290};
291
292static const CGEN_OPINST sfmt_lwgotrel_ops[] ATTRIBUTE_UNUSED = {
293 { INPUT, "got16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOT16), 0, 0 },
cedb97b6 294 { INPUT, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_got16", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
84e94c90
NC
295 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
296 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
297 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
298};
299
300static const CGEN_OPINST sfmt_orhigotoffi_ops[] ATTRIBUTE_UNUSED = {
cedb97b6 301 { INPUT, "gotoffhi16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFHI16), 0, 0 },
84e94c90
NC
302 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
303 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
304 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
305};
306
307static const CGEN_OPINST sfmt_addgotoff_ops[] ATTRIBUTE_UNUSED = {
308 { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
309 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
310 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
311 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
312};
313
314static const CGEN_OPINST sfmt_swgotoff_ops[] ATTRIBUTE_UNUSED = {
315 { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
316 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
317 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
cedb97b6 318 { OUTPUT, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
84e94c90
NC
319 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
320};
321
322static const CGEN_OPINST sfmt_lwgotoff_ops[] ATTRIBUTE_UNUSED = {
323 { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
cedb97b6 324 { INPUT, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
84e94c90
NC
325 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
326 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
327 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
328};
329
330static const CGEN_OPINST sfmt_shgotoff_ops[] ATTRIBUTE_UNUSED = {
331 { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
332 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
333 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
cedb97b6 334 { OUTPUT, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 },
84e94c90
NC
335 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
336};
337
338static const CGEN_OPINST sfmt_lhgotoff_ops[] ATTRIBUTE_UNUSED = {
339 { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
cedb97b6 340 { INPUT, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 },
84e94c90
NC
341 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
342 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
343 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
344};
345
346static const CGEN_OPINST sfmt_sbgotoff_ops[] ATTRIBUTE_UNUSED = {
347 { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
348 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
349 { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
cedb97b6 350 { OUTPUT, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 },
84e94c90
NC
351 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
352};
353
354static const CGEN_OPINST sfmt_lbgotoff_ops[] ATTRIBUTE_UNUSED = {
355 { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
cedb97b6 356 { INPUT, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 },
84e94c90
NC
357 { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
358 { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
359 { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
360};
361
362#undef OP_ENT
363#undef INPUT
364#undef OUTPUT
365#undef END
366#undef COND_REF
367
368/* Operand instance lookup table. */
369
370static const CGEN_OPINST *lm32_cgen_opinst_table[MAX_INSNS] = {
371 0,
372 & sfmt_add_ops[0],
373 & sfmt_addi_ops[0],
374 & sfmt_add_ops[0],
375 & sfmt_andi_ops[0],
376 & sfmt_andhii_ops[0],
377 & sfmt_b_ops[0],
378 & sfmt_bi_ops[0],
379 & sfmt_be_ops[0],
380 & sfmt_be_ops[0],
381 & sfmt_be_ops[0],
382 & sfmt_be_ops[0],
383 & sfmt_be_ops[0],
384 & sfmt_be_ops[0],
385 & sfmt_call_ops[0],
386 & sfmt_calli_ops[0],
387 & sfmt_add_ops[0],
388 & sfmt_addi_ops[0],
389 & sfmt_add_ops[0],
390 & sfmt_addi_ops[0],
391 & sfmt_add_ops[0],
392 & sfmt_addi_ops[0],
393 & sfmt_add_ops[0],
394 & sfmt_andi_ops[0],
395 & sfmt_add_ops[0],
396 & sfmt_andi_ops[0],
397 & sfmt_add_ops[0],
398 & sfmt_addi_ops[0],
399 & sfmt_divu_ops[0],
400 & sfmt_lb_ops[0],
401 & sfmt_lb_ops[0],
402 & sfmt_lh_ops[0],
403 & sfmt_lh_ops[0],
404 & sfmt_lw_ops[0],
405 & sfmt_divu_ops[0],
406 & sfmt_add_ops[0],
407 & sfmt_addi_ops[0],
408 & sfmt_add_ops[0],
409 & sfmt_andi_ops[0],
410 & sfmt_add_ops[0],
411 & sfmt_ori_ops[0],
412 & sfmt_andhii_ops[0],
413 & sfmt_rcsr_ops[0],
414 & sfmt_sb_ops[0],
415 & sfmt_sextb_ops[0],
416 & sfmt_sextb_ops[0],
417 & sfmt_sh_ops[0],
cedb97b6 418 & sfmt_add_ops[0],
84e94c90 419 & sfmt_addi_ops[0],
cedb97b6 420 & sfmt_add_ops[0],
84e94c90 421 & sfmt_addi_ops[0],
cedb97b6 422 & sfmt_add_ops[0],
84e94c90
NC
423 & sfmt_addi_ops[0],
424 & sfmt_add_ops[0],
425 & sfmt_sw_ops[0],
426 & sfmt_user_ops[0],
427 & sfmt_wcsr_ops[0],
428 & sfmt_add_ops[0],
429 & sfmt_andi_ops[0],
430 & sfmt_add_ops[0],
431 & sfmt_andi_ops[0],
432 & sfmt_break_ops[0],
433 & sfmt_break_ops[0],
434 & sfmt_bret_ops[0],
435 & sfmt_bret_ops[0],
436 & sfmt_bret_ops[0],
437 & sfmt_sextb_ops[0],
fee1d3e8 438 & sfmt_mvi_ops[0],
84e94c90 439 & sfmt_mvui_ops[0],
fee1d3e8 440 & sfmt_mvhi_ops[0],
84e94c90
NC
441 & sfmt_mva_ops[0],
442 & sfmt_sextb_ops[0],
443 & sfmt_nop_ops[0],
444 & sfmt_lbgprel_ops[0],
445 & sfmt_lbgprel_ops[0],
446 & sfmt_lhgprel_ops[0],
447 & sfmt_lhgprel_ops[0],
448 & sfmt_lwgprel_ops[0],
449 & sfmt_sbgprel_ops[0],
450 & sfmt_shgprel_ops[0],
451 & sfmt_swgprel_ops[0],
452 & sfmt_lwgotrel_ops[0],
453 & sfmt_orhigotoffi_ops[0],
454 & sfmt_addgotoff_ops[0],
455 & sfmt_swgotoff_ops[0],
456 & sfmt_lwgotoff_ops[0],
457 & sfmt_shgotoff_ops[0],
458 & sfmt_lhgotoff_ops[0],
459 & sfmt_lhgotoff_ops[0],
460 & sfmt_sbgotoff_ops[0],
461 & sfmt_lbgotoff_ops[0],
462 & sfmt_lbgotoff_ops[0],
463};
464
465/* Function to call before using the operand instance table. */
466
467void
468lm32_cgen_init_opinst_table (cd)
469 CGEN_CPU_DESC cd;
470{
471 int i;
472 const CGEN_OPINST **oi = & lm32_cgen_opinst_table[0];
473 CGEN_INSN *insns = (CGEN_INSN *) cd->insn_table.init_entries;
474 for (i = 0; i < MAX_INSNS; ++i)
475 insns[i].opinst = oi[i];
476}
This page took 0.302378 seconds and 4 git commands to generate.