1 /* Semantic operand instances for lm32.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2009 Free Software Foundation, Inc.
7 This file is part of the GNU Binutils and/or GDB, the GNU debugger.
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)
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.
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.
29 #include "lm32-desc.h"
32 /* Operand references. */
34 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
35 #define OP_ENT(op) LM32_OPERAND_##op
37 #define OP_ENT(op) LM32_OPERAND_/**/op
39 #define INPUT CGEN_OPINST_INPUT
40 #define OUTPUT CGEN_OPINST_OUTPUT
41 #define END CGEN_OPINST_END
42 #define COND_REF CGEN_OPINST_COND_REF
44 static const CGEN_OPINST sfmt_empty_ops
[] ATTRIBUTE_UNUSED
= {
45 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
48 static const CGEN_OPINST sfmt_add_ops
[] ATTRIBUTE_UNUSED
= {
49 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
50 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
51 { OUTPUT
, "r2", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R2
), 0, 0 },
52 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
55 static const CGEN_OPINST sfmt_addi_ops
[] ATTRIBUTE_UNUSED
= {
56 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
57 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
58 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
59 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
62 static const CGEN_OPINST sfmt_andi_ops
[] ATTRIBUTE_UNUSED
= {
63 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
64 { INPUT
, "uimm", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (UIMM
), 0, 0 },
65 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
66 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
69 static const CGEN_OPINST sfmt_andhii_ops
[] ATTRIBUTE_UNUSED
= {
70 { INPUT
, "hi16", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (HI16
), 0, 0 },
71 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
72 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
73 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
76 static const CGEN_OPINST sfmt_b_ops
[] ATTRIBUTE_UNUSED
= {
77 { INPUT
, "f_r0", HW_H_UINT
, CGEN_MODE_UINT
, 0, 0, 0 },
78 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
79 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
80 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
83 static const CGEN_OPINST sfmt_bi_ops
[] ATTRIBUTE_UNUSED
= {
84 { INPUT
, "call", HW_H_IADDR
, CGEN_MODE_USI
, OP_ENT (CALL
), 0, 0 },
85 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
86 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
89 static const CGEN_OPINST sfmt_be_ops
[] ATTRIBUTE_UNUSED
= {
90 { INPUT
, "branch", HW_H_IADDR
, CGEN_MODE_USI
, OP_ENT (BRANCH
), 0, COND_REF
},
91 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
92 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
93 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, COND_REF
},
94 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
97 static const CGEN_OPINST sfmt_call_ops
[] ATTRIBUTE_UNUSED
= {
98 { INPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
99 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
100 { OUTPUT
, "h_gr_SI_29", HW_H_GR
, CGEN_MODE_SI
, 0, 29, 0 },
101 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
102 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
105 static const CGEN_OPINST sfmt_calli_ops
[] ATTRIBUTE_UNUSED
= {
106 { INPUT
, "call", HW_H_IADDR
, CGEN_MODE_USI
, OP_ENT (CALL
), 0, 0 },
107 { INPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
108 { OUTPUT
, "h_gr_SI_29", HW_H_GR
, CGEN_MODE_SI
, 0, 29, 0 },
109 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
110 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
113 static const CGEN_OPINST sfmt_divu_ops
[] ATTRIBUTE_UNUSED
= {
114 { INPUT
, "f_r0", HW_H_UINT
, CGEN_MODE_UINT
, 0, 0, 0 },
115 { INPUT
, "f_r1", HW_H_UINT
, CGEN_MODE_UINT
, 0, 0, 0 },
116 { INPUT
, "f_r2", HW_H_UINT
, CGEN_MODE_UINT
, 0, 0, 0 },
117 { INPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
118 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
119 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
122 static const CGEN_OPINST sfmt_lb_ops
[] ATTRIBUTE_UNUSED
= {
123 { INPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
124 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
125 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
126 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
127 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
130 static const CGEN_OPINST sfmt_lh_ops
[] ATTRIBUTE_UNUSED
= {
131 { INPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
132 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
133 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
134 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
135 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
138 static const CGEN_OPINST sfmt_lw_ops
[] ATTRIBUTE_UNUSED
= {
139 { INPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
140 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
141 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
142 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
143 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
146 static const CGEN_OPINST sfmt_ori_ops
[] ATTRIBUTE_UNUSED
= {
147 { INPUT
, "lo16", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (LO16
), 0, 0 },
148 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
149 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
150 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
153 static const CGEN_OPINST sfmt_rcsr_ops
[] ATTRIBUTE_UNUSED
= {
154 { INPUT
, "csr", HW_H_CSR
, CGEN_MODE_SI
, OP_ENT (CSR
), 0, 0 },
155 { OUTPUT
, "r2", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R2
), 0, 0 },
156 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
159 static const CGEN_OPINST sfmt_sb_ops
[] ATTRIBUTE_UNUSED
= {
160 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
161 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
162 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
163 { OUTPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
164 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
167 static const CGEN_OPINST sfmt_sextb_ops
[] ATTRIBUTE_UNUSED
= {
168 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
169 { OUTPUT
, "r2", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R2
), 0, 0 },
170 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
173 static const CGEN_OPINST sfmt_sh_ops
[] ATTRIBUTE_UNUSED
= {
174 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
175 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
176 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
177 { OUTPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
178 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
181 static const CGEN_OPINST sfmt_sw_ops
[] ATTRIBUTE_UNUSED
= {
182 { INPUT
, "imm", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (IMM
), 0, 0 },
183 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
184 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
185 { OUTPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
186 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
189 static const CGEN_OPINST sfmt_user_ops
[] ATTRIBUTE_UNUSED
= {
190 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
191 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
192 { INPUT
, "user", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (USER
), 0, 0 },
193 { OUTPUT
, "r2", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R2
), 0, 0 },
194 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
197 static const CGEN_OPINST sfmt_wcsr_ops
[] ATTRIBUTE_UNUSED
= {
198 { INPUT
, "f_csr", HW_H_UINT
, CGEN_MODE_UINT
, 0, 0, 0 },
199 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
200 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
203 static const CGEN_OPINST sfmt_break_ops
[] ATTRIBUTE_UNUSED
= {
204 { INPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
205 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
206 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
209 static const CGEN_OPINST sfmt_bret_ops
[] ATTRIBUTE_UNUSED
= {
210 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
211 { OUTPUT
, "pc", HW_H_PC
, CGEN_MODE_USI
, 0, 0, 0 },
212 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
215 static const CGEN_OPINST sfmt_mvui_ops
[] ATTRIBUTE_UNUSED
= {
216 { INPUT
, "lo16", HW_H_UINT
, CGEN_MODE_UINT
, OP_ENT (LO16
), 0, 0 },
217 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
218 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
221 static const CGEN_OPINST sfmt_mva_ops
[] ATTRIBUTE_UNUSED
= {
222 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
223 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
224 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
225 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
228 static const CGEN_OPINST sfmt_nop_ops
[] ATTRIBUTE_UNUSED
= {
229 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
230 { OUTPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
231 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
234 static const CGEN_OPINST sfmt_lbgprel_ops
[] ATTRIBUTE_UNUSED
= {
235 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
236 { INPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
237 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
238 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
239 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
242 static const CGEN_OPINST sfmt_lhgprel_ops
[] ATTRIBUTE_UNUSED
= {
243 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
244 { INPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
245 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
246 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
247 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
250 static const CGEN_OPINST sfmt_lwgprel_ops
[] ATTRIBUTE_UNUSED
= {
251 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
252 { INPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
253 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
254 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
255 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
258 static const CGEN_OPINST sfmt_sbgprel_ops
[] ATTRIBUTE_UNUSED
= {
259 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
260 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
261 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
262 { OUTPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
263 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
266 static const CGEN_OPINST sfmt_shgprel_ops
[] ATTRIBUTE_UNUSED
= {
267 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
268 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
269 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
270 { OUTPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
271 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
274 static const CGEN_OPINST sfmt_swgprel_ops
[] ATTRIBUTE_UNUSED
= {
275 { INPUT
, "gp16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GP16
), 0, 0 },
276 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
277 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
278 { OUTPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
279 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
282 static const CGEN_OPINST sfmt_lwgotrel_ops
[] ATTRIBUTE_UNUSED
= {
283 { INPUT
, "got16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOT16
), 0, 0 },
284 { INPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_got16", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
285 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
286 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
287 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
290 static const CGEN_OPINST sfmt_orhigotoffi_ops
[] ATTRIBUTE_UNUSED
= {
291 { INPUT
, "gotoffhi16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFHI16
), 0, 0 },
292 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
293 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
294 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
297 static const CGEN_OPINST sfmt_addgotoff_ops
[] ATTRIBUTE_UNUSED
= {
298 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
299 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
300 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
301 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
304 static const CGEN_OPINST sfmt_swgotoff_ops
[] ATTRIBUTE_UNUSED
= {
305 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
306 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
307 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
308 { OUTPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
309 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
312 static const CGEN_OPINST sfmt_lwgotoff_ops
[] ATTRIBUTE_UNUSED
= {
313 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
314 { INPUT
, "h_memory_SI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_SI
, 0, 0, 0 },
315 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
316 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
317 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
320 static const CGEN_OPINST sfmt_shgotoff_ops
[] ATTRIBUTE_UNUSED
= {
321 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
322 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
323 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
324 { OUTPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
325 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
328 static const CGEN_OPINST sfmt_lhgotoff_ops
[] ATTRIBUTE_UNUSED
= {
329 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
330 { INPUT
, "h_memory_HI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_HI
, 0, 0, 0 },
331 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
332 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
333 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
336 static const CGEN_OPINST sfmt_sbgotoff_ops
[] ATTRIBUTE_UNUSED
= {
337 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
338 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
339 { INPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
340 { OUTPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
341 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
344 static const CGEN_OPINST sfmt_lbgotoff_ops
[] ATTRIBUTE_UNUSED
= {
345 { INPUT
, "gotofflo16", HW_H_SINT
, CGEN_MODE_INT
, OP_ENT (GOTOFFLO16
), 0, 0 },
346 { INPUT
, "h_memory_QI_add__SI_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY
, CGEN_MODE_QI
, 0, 0, 0 },
347 { INPUT
, "r0", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R0
), 0, 0 },
348 { OUTPUT
, "r1", HW_H_GR
, CGEN_MODE_SI
, OP_ENT (R1
), 0, 0 },
349 { END
, (const char *)0, (enum cgen_hw_type
)0, (enum cgen_mode
)0, (enum cgen_operand_type
)0, 0, 0 }
358 /* Operand instance lookup table. */
360 static const CGEN_OPINST
*lm32_cgen_opinst_table
[MAX_INSNS
] = {
366 & sfmt_andhii_ops
[0],
402 & sfmt_andhii_ops
[0],
430 & sfmt_andhii_ops
[0],
434 & sfmt_lbgprel_ops
[0],
435 & sfmt_lbgprel_ops
[0],
436 & sfmt_lhgprel_ops
[0],
437 & sfmt_lhgprel_ops
[0],
438 & sfmt_lwgprel_ops
[0],
439 & sfmt_sbgprel_ops
[0],
440 & sfmt_shgprel_ops
[0],
441 & sfmt_swgprel_ops
[0],
442 & sfmt_lwgotrel_ops
[0],
443 & sfmt_orhigotoffi_ops
[0],
444 & sfmt_addgotoff_ops
[0],
445 & sfmt_swgotoff_ops
[0],
446 & sfmt_lwgotoff_ops
[0],
447 & sfmt_shgotoff_ops
[0],
448 & sfmt_lhgotoff_ops
[0],
449 & sfmt_lhgotoff_ops
[0],
450 & sfmt_sbgotoff_ops
[0],
451 & sfmt_lbgotoff_ops
[0],
452 & sfmt_lbgotoff_ops
[0],
455 /* Function to call before using the operand instance table. */
458 lm32_cgen_init_opinst_table (cd
)
462 const CGEN_OPINST
**oi
= & lm32_cgen_opinst_table
[0];
463 CGEN_INSN
*insns
= (CGEN_INSN
*) cd
->insn_table
.init_entries
;
464 for (i
= 0; i
< MAX_INSNS
; ++i
)
465 insns
[i
].opinst
= oi
[i
];