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