1 /* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */
2 /* Semantic operand instances for lm32.
4 THIS FILE IS MACHINE GENERATED WITH CGEN.
6 Copyright (C) 1996-2022 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.
30 #include "lm32-desc.h"
33 /* Operand references. */
35 #define OP_ENT(op) LM32_OPERAND_##op
36 #define INPUT CGEN_OPINST_INPUT
37 #define OUTPUT CGEN_OPINST_OUTPUT
38 #define END CGEN_OPINST_END
39 #define COND_REF CGEN_OPINST_COND_REF
41 static const CGEN_OPINST sfmt_empty_ops
[] ATTRIBUTE_UNUSED
= {
42 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
45 static const CGEN_OPINST sfmt_add_ops
[] ATTRIBUTE_UNUSED
= {
46 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
47 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
48 { OUTPUT
, "r2", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R2
), 0, 0 },
49 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
52 static const CGEN_OPINST sfmt_addi_ops
[] ATTRIBUTE_UNUSED
= {
53 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
54 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
55 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
56 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
59 static const CGEN_OPINST sfmt_andi_ops
[] ATTRIBUTE_UNUSED
= {
60 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
61 { INPUT
, "uimm", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (UIMM
), 0, 0 },
62 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
63 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
66 static const CGEN_OPINST sfmt_andhii_ops
[] ATTRIBUTE_UNUSED
= {
67 { INPUT
, "hi16", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (HI16
), 0, 0 },
68 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
69 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
70 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
73 static const CGEN_OPINST sfmt_b_ops
[] ATTRIBUTE_UNUSED
= {
74 { INPUT
, "f_r0", HW_H_UINT
, CGEN_MODE_UINT
, 0, 0, 0 },
75 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
76 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
77 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
80 static const CGEN_OPINST sfmt_bi_ops
[] ATTRIBUTE_UNUSED
= {
81 { INPUT
, "call", HW_H_IADDR
, CGEN_MODE_USI
, OP_ENT (CALL
), 0, 0 },
82 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
83 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
86 static const CGEN_OPINST sfmt_be_ops
[] ATTRIBUTE_UNUSED
= {
87 { INPUT
, "branch", HW_H_IADDR
, CGEN_MODE_USI
, OP_ENT (BRANCH
), 0, COND_REF
},
88 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
89 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
90 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, COND_REF
},
91 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
94 static const CGEN_OPINST sfmt_call_ops
[] ATTRIBUTE_UNUSED
= {
95 { INPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
96 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
97 { OUTPUT
, "h_gr_SI_29", HW_H_GR
, CGEN_MODE_SI
, 0, 29, 0 },
98 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
99 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
102 static const CGEN_OPINST sfmt_calli_ops
[] ATTRIBUTE_UNUSED
= {
103 { INPUT
, "call", HW_H_IADDR
, CGEN_MODE_USI
, OP_ENT (CALL
), 0, 0 },
104 { INPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
105 { OUTPUT
, "h_gr_SI_29", HW_H_GR
, CGEN_MODE_SI
, 0, 29, 0 },
106 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
107 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
110 static const CGEN_OPINST sfmt_divu_ops
[] ATTRIBUTE_UNUSED
= {
111 { INPUT
, "f_r0", HW_H_UINT
, CGEN_MODE_UINT
, 0, 0, 0 },
112 { INPUT
, "f_r1", HW_H_UINT
, CGEN_MODE_UINT
, 0, 0, 0 },
113 { INPUT
, "f_r2", HW_H_UINT
, CGEN_MODE_UINT
, 0, 0, 0 },
114 { INPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
115 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
116 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
119 static const CGEN_OPINST sfmt_lb_ops
[] ATTRIBUTE_UNUSED
= {
120 { INPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
121 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
122 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
123 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
124 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
127 static const CGEN_OPINST sfmt_lh_ops
[] ATTRIBUTE_UNUSED
= {
128 { INPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
129 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
130 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
131 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
132 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
135 static const CGEN_OPINST sfmt_lw_ops
[] ATTRIBUTE_UNUSED
= {
136 { INPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
137 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
138 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
139 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
140 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
143 static const CGEN_OPINST sfmt_ori_ops
[] ATTRIBUTE_UNUSED
= {
144 { INPUT
, "lo16", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (LO16
), 0, 0 },
145 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
146 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
147 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
150 static const CGEN_OPINST sfmt_rcsr_ops
[] ATTRIBUTE_UNUSED
= {
151 { INPUT
, "csr", HW_H_CSR
, CGEN_MODE_SI
, OP_ENT (CSR
), 0, 0 },
152 { OUTPUT
, "r2", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R2
), 0, 0 },
153 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
156 static const CGEN_OPINST sfmt_sb_ops
[] ATTRIBUTE_UNUSED
= {
157 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
158 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
159 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
160 { OUTPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
161 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
164 static const CGEN_OPINST sfmt_sextb_ops
[] ATTRIBUTE_UNUSED
= {
165 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
166 { OUTPUT
, "r2", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R2
), 0, 0 },
167 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
170 static const CGEN_OPINST sfmt_sh_ops
[] ATTRIBUTE_UNUSED
= {
171 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
172 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
173 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
174 { OUTPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
175 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
178 static const CGEN_OPINST sfmt_sw_ops
[] ATTRIBUTE_UNUSED
= {
179 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
180 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
181 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
182 { OUTPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
183 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
186 static const CGEN_OPINST sfmt_user_ops
[] ATTRIBUTE_UNUSED
= {
187 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
188 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
189 { INPUT
, "user", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (USER
), 0, 0 },
190 { OUTPUT
, "r2", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R2
), 0, 0 },
191 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
194 static const CGEN_OPINST sfmt_wcsr_ops
[] ATTRIBUTE_UNUSED
= {
195 { INPUT
, "f_csr", HW_H_UINT
, CGEN_MODE_UINT
, 0, 0, 0 },
196 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
197 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
200 static const CGEN_OPINST sfmt_break_ops
[] ATTRIBUTE_UNUSED
= {
201 { INPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
202 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
203 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
206 static const CGEN_OPINST sfmt_bret_ops
[] ATTRIBUTE_UNUSED
= {
207 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
208 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
209 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
212 static const CGEN_OPINST sfmt_mvi_ops
[] ATTRIBUTE_UNUSED
= {
213 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
214 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
215 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
216 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
219 static const CGEN_OPINST sfmt_mvui_ops
[] ATTRIBUTE_UNUSED
= {
220 { INPUT
, "lo16", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (LO16
), 0, 0 },
221 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
222 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
225 static const CGEN_OPINST sfmt_mvhi_ops
[] ATTRIBUTE_UNUSED
= {
226 { INPUT
, "hi16", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (HI16
), 0, 0 },
227 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
228 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
229 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
232 static const CGEN_OPINST sfmt_mva_ops
[] ATTRIBUTE_UNUSED
= {
233 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
234 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
235 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
236 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
239 static const CGEN_OPINST sfmt_nop_ops
[] ATTRIBUTE_UNUSED
= {
240 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
241 { OUTPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
242 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
245 static const CGEN_OPINST sfmt_lbgprel_ops
[] ATTRIBUTE_UNUSED
= {
246 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
247 { INPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
248 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
249 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
250 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
253 static const CGEN_OPINST sfmt_lhgprel_ops
[] ATTRIBUTE_UNUSED
= {
254 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
255 { INPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
256 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
257 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
258 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
261 static const CGEN_OPINST sfmt_lwgprel_ops
[] ATTRIBUTE_UNUSED
= {
262 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
263 { INPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
264 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
265 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
266 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
269 static const CGEN_OPINST sfmt_sbgprel_ops
[] ATTRIBUTE_UNUSED
= {
270 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
271 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
272 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
273 { OUTPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
274 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
277 static const CGEN_OPINST sfmt_shgprel_ops
[] ATTRIBUTE_UNUSED
= {
278 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
279 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
280 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
281 { OUTPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
282 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
285 static const CGEN_OPINST sfmt_swgprel_ops
[] ATTRIBUTE_UNUSED
= {
286 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
287 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
288 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
289 { OUTPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
290 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
293 static const CGEN_OPINST sfmt_lwgotrel_ops
[] ATTRIBUTE_UNUSED
= {
294 { INPUT
, "got16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOT16
), 0, 0 },
295 { INPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_got16", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
296 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
297 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
298 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
301 static const CGEN_OPINST sfmt_orhigotoffi_ops
[] ATTRIBUTE_UNUSED
= {
302 { INPUT
, "gotoffhi16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFHI16
), 0, 0 },
303 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
304 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
305 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
308 static const CGEN_OPINST sfmt_addgotoff_ops
[] ATTRIBUTE_UNUSED
= {
309 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
310 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
311 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
312 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
315 static const CGEN_OPINST sfmt_swgotoff_ops
[] ATTRIBUTE_UNUSED
= {
316 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
317 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
318 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
319 { OUTPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
320 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
323 static const CGEN_OPINST sfmt_lwgotoff_ops
[] ATTRIBUTE_UNUSED
= {
324 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
325 { INPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
326 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
327 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
328 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
331 static const CGEN_OPINST sfmt_shgotoff_ops
[] ATTRIBUTE_UNUSED
= {
332 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
333 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
334 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
335 { OUTPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
336 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
339 static const CGEN_OPINST sfmt_lhgotoff_ops
[] ATTRIBUTE_UNUSED
= {
340 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
341 { INPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
342 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
343 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
344 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
347 static const CGEN_OPINST sfmt_sbgotoff_ops
[] ATTRIBUTE_UNUSED
= {
348 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
349 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
350 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
351 { OUTPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
352 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
355 static const CGEN_OPINST sfmt_lbgotoff_ops
[] ATTRIBUTE_UNUSED
= {
356 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
357 { INPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
358 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
359 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
360 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
369 /* Operand instance lookup table. */
371 static const CGEN_OPINST
*lm32_cgen_opinst_table
[MAX_INSNS
] = {
377 & sfmt_andhii_ops
[0],
413 & sfmt_andhii_ops
[0],
445 & sfmt_lbgprel_ops
[0],
446 & sfmt_lbgprel_ops
[0],
447 & sfmt_lhgprel_ops
[0],
448 & sfmt_lhgprel_ops
[0],
449 & sfmt_lwgprel_ops
[0],
450 & sfmt_sbgprel_ops
[0],
451 & sfmt_shgprel_ops
[0],
452 & sfmt_swgprel_ops
[0],
453 & sfmt_lwgotrel_ops
[0],
454 & sfmt_orhigotoffi_ops
[0],
455 & sfmt_addgotoff_ops
[0],
456 & sfmt_swgotoff_ops
[0],
457 & sfmt_lwgotoff_ops
[0],
458 & sfmt_shgotoff_ops
[0],
459 & sfmt_lhgotoff_ops
[0],
460 & sfmt_lhgotoff_ops
[0],
461 & sfmt_sbgotoff_ops
[0],
462 & sfmt_lbgotoff_ops
[0],
463 & sfmt_lbgotoff_ops
[0],
466 /* Function to call before using the operand instance table. */
469 lm32_cgen_init_opinst_table (CGEN_CPU_DESC cd
)
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
];