OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [opcodes/] [lm32-opinst.c] - Blame information for rev 205

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 205 julius
/* Semantic operand instances for lm32.
2
 
3
THIS FILE IS MACHINE GENERATED WITH CGEN.
4
 
5
Copyright 1996-2009 Free Software Foundation, Inc.
6
 
7
This 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
 
34
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
35
#define OP_ENT(op) LM32_OPERAND_##op
36
#else
37
#define OP_ENT(op) LM32_OPERAND_/**/op
38
#endif
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
43
 
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 }
46
};
47
 
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 }
53
};
54
 
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 }
60
};
61
 
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 }
67
};
68
 
69
static const CGEN_OPINST sfmt_andhii_ops[] ATTRIBUTE_UNUSED = {
70
  { INPUT, "hi16", HW_H_UINT, CGEN_MODE_SI, 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 }
74
};
75
 
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 }
81
};
82
 
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 }
87
};
88
 
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 }
95
};
96
 
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 }
103
};
104
 
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 }
111
};
112
 
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 }
120
};
121
 
122
static const CGEN_OPINST sfmt_lb_ops[] ATTRIBUTE_UNUSED = {
123
  { INPUT, "h_memory_QI_add__DFLT_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 }
128
};
129
 
130
static const CGEN_OPINST sfmt_lh_ops[] ATTRIBUTE_UNUSED = {
131
  { INPUT, "h_memory_HI_add__DFLT_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 }
136
};
137
 
138
static const CGEN_OPINST sfmt_lw_ops[] ATTRIBUTE_UNUSED = {
139
  { INPUT, "h_memory_SI_add__DFLT_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 }
144
};
145
 
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 }
151
};
152
 
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 }
157
};
158
 
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__DFLT_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 }
165
};
166
 
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 }
171
};
172
 
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__DFLT_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 }
179
};
180
 
181
static const CGEN_OPINST sfmt_sl_ops[] ATTRIBUTE_UNUSED = {
182
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
183
  { INPUT, "r1", HW_H_GR, CGEN_MODE_INT, OP_ENT (R1), 0, 0 },
184
  { OUTPUT, "r2", HW_H_GR, CGEN_MODE_SI, OP_ENT (R2), 0, 0 },
185
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
186
};
187
 
188
static const CGEN_OPINST sfmt_sw_ops[] ATTRIBUTE_UNUSED = {
189
  { INPUT, "imm", HW_H_SINT, CGEN_MODE_INT, OP_ENT (IMM), 0, 0 },
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
  { OUTPUT, "h_memory_SI_add__DFLT_r0_ext__SI_trunc__HI_imm", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
193
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
194
};
195
 
196
static const CGEN_OPINST sfmt_user_ops[] ATTRIBUTE_UNUSED = {
197
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
198
  { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
199
  { INPUT, "user", HW_H_UINT, CGEN_MODE_UINT, OP_ENT (USER), 0, 0 },
200
  { OUTPUT, "r2", HW_H_GR, CGEN_MODE_SI, OP_ENT (R2), 0, 0 },
201
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
202
};
203
 
204
static const CGEN_OPINST sfmt_wcsr_ops[] ATTRIBUTE_UNUSED = {
205
  { INPUT, "f_csr", HW_H_UINT, CGEN_MODE_UINT, 0, 0, 0 },
206
  { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
207
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
208
};
209
 
210
static const CGEN_OPINST sfmt_break_ops[] ATTRIBUTE_UNUSED = {
211
  { INPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
212
  { OUTPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
213
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
214
};
215
 
216
static const CGEN_OPINST sfmt_bret_ops[] ATTRIBUTE_UNUSED = {
217
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
218
  { OUTPUT, "pc", HW_H_PC, CGEN_MODE_USI, 0, 0, 0 },
219
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
220
};
221
 
222
static const CGEN_OPINST sfmt_mvui_ops[] ATTRIBUTE_UNUSED = {
223
  { INPUT, "lo16", HW_H_UINT, CGEN_MODE_UINT, OP_ENT (LO16), 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 }
226
};
227
 
228
static const CGEN_OPINST sfmt_mva_ops[] ATTRIBUTE_UNUSED = {
229
  { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
230
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
231
  { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
232
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
233
};
234
 
235
static const CGEN_OPINST sfmt_nop_ops[] ATTRIBUTE_UNUSED = {
236
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
237
  { OUTPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
238
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
239
};
240
 
241
static const CGEN_OPINST sfmt_lbgprel_ops[] ATTRIBUTE_UNUSED = {
242
  { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
243
  { INPUT, "h_memory_QI_add__DFLT_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 },
244
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
245
  { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
246
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
247
};
248
 
249
static const CGEN_OPINST sfmt_lhgprel_ops[] ATTRIBUTE_UNUSED = {
250
  { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
251
  { INPUT, "h_memory_HI_add__DFLT_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 },
252
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
253
  { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
254
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
255
};
256
 
257
static const CGEN_OPINST sfmt_lwgprel_ops[] ATTRIBUTE_UNUSED = {
258
  { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
259
  { INPUT, "h_memory_SI_add__DFLT_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
260
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
261
  { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
262
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
263
};
264
 
265
static const CGEN_OPINST sfmt_sbgprel_ops[] ATTRIBUTE_UNUSED = {
266
  { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
267
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
268
  { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
269
  { OUTPUT, "h_memory_QI_add__DFLT_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 },
270
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
271
};
272
 
273
static const CGEN_OPINST sfmt_shgprel_ops[] ATTRIBUTE_UNUSED = {
274
  { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
275
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
276
  { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
277
  { OUTPUT, "h_memory_HI_add__DFLT_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 },
278
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
279
};
280
 
281
static const CGEN_OPINST sfmt_swgprel_ops[] ATTRIBUTE_UNUSED = {
282
  { INPUT, "gp16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GP16), 0, 0 },
283
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
284
  { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
285
  { OUTPUT, "h_memory_SI_add__DFLT_r0_ext__SI_trunc__HI_gp16", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
286
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
287
};
288
 
289
static const CGEN_OPINST sfmt_lwgotrel_ops[] ATTRIBUTE_UNUSED = {
290
  { INPUT, "got16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOT16), 0, 0 },
291
  { INPUT, "h_memory_SI_add__DFLT_r0_ext__SI_trunc__HI_got16", HW_H_MEMORY, CGEN_MODE_SI, 0, 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 }
295
};
296
 
297
static const CGEN_OPINST sfmt_orhigotoffi_ops[] ATTRIBUTE_UNUSED = {
298
  { INPUT, "gotoffhi16", HW_H_SINT, CGEN_MODE_SI, OP_ENT (GOTOFFHI16), 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 }
302
};
303
 
304
static const CGEN_OPINST sfmt_addgotoff_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
  { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
308
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
309
};
310
 
311
static const CGEN_OPINST sfmt_swgotoff_ops[] ATTRIBUTE_UNUSED = {
312
  { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
313
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
314
  { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
315
  { OUTPUT, "h_memory_SI_add__DFLT_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
316
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
317
};
318
 
319
static const CGEN_OPINST sfmt_lwgotoff_ops[] ATTRIBUTE_UNUSED = {
320
  { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
321
  { INPUT, "h_memory_SI_add__DFLT_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 },
322
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
323
  { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
324
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
325
};
326
 
327
static const CGEN_OPINST sfmt_shgotoff_ops[] ATTRIBUTE_UNUSED = {
328
  { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
329
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
330
  { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
331
  { OUTPUT, "h_memory_HI_add__DFLT_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 },
332
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
333
};
334
 
335
static const CGEN_OPINST sfmt_lhgotoff_ops[] ATTRIBUTE_UNUSED = {
336
  { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
337
  { INPUT, "h_memory_HI_add__DFLT_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 },
338
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
339
  { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
340
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
341
};
342
 
343
static const CGEN_OPINST sfmt_sbgotoff_ops[] ATTRIBUTE_UNUSED = {
344
  { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
345
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
346
  { INPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
347
  { OUTPUT, "h_memory_QI_add__DFLT_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 },
348
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
349
};
350
 
351
static const CGEN_OPINST sfmt_lbgotoff_ops[] ATTRIBUTE_UNUSED = {
352
  { INPUT, "gotofflo16", HW_H_SINT, CGEN_MODE_INT, OP_ENT (GOTOFFLO16), 0, 0 },
353
  { INPUT, "h_memory_QI_add__DFLT_r0_ext__SI_trunc__HI_gotofflo16", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 },
354
  { INPUT, "r0", HW_H_GR, CGEN_MODE_SI, OP_ENT (R0), 0, 0 },
355
  { OUTPUT, "r1", HW_H_GR, CGEN_MODE_SI, OP_ENT (R1), 0, 0 },
356
  { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }
357
};
358
 
359
#undef OP_ENT
360
#undef INPUT
361
#undef OUTPUT
362
#undef END
363
#undef COND_REF
364
 
365
/* Operand instance lookup table.  */
366
 
367
static const CGEN_OPINST *lm32_cgen_opinst_table[MAX_INSNS] = {
368
  0,
369
  & sfmt_add_ops[0],
370
  & sfmt_addi_ops[0],
371
  & sfmt_add_ops[0],
372
  & sfmt_andi_ops[0],
373
  & sfmt_andhii_ops[0],
374
  & sfmt_b_ops[0],
375
  & sfmt_bi_ops[0],
376
  & sfmt_be_ops[0],
377
  & sfmt_be_ops[0],
378
  & sfmt_be_ops[0],
379
  & sfmt_be_ops[0],
380
  & sfmt_be_ops[0],
381
  & sfmt_be_ops[0],
382
  & sfmt_call_ops[0],
383
  & sfmt_calli_ops[0],
384
  & sfmt_add_ops[0],
385
  & sfmt_addi_ops[0],
386
  & sfmt_add_ops[0],
387
  & sfmt_addi_ops[0],
388
  & sfmt_add_ops[0],
389
  & sfmt_addi_ops[0],
390
  & sfmt_add_ops[0],
391
  & sfmt_andi_ops[0],
392
  & sfmt_add_ops[0],
393
  & sfmt_andi_ops[0],
394
  & sfmt_add_ops[0],
395
  & sfmt_addi_ops[0],
396
  & sfmt_divu_ops[0],
397
  & sfmt_lb_ops[0],
398
  & sfmt_lb_ops[0],
399
  & sfmt_lh_ops[0],
400
  & sfmt_lh_ops[0],
401
  & sfmt_lw_ops[0],
402
  & sfmt_divu_ops[0],
403
  & sfmt_add_ops[0],
404
  & sfmt_addi_ops[0],
405
  & sfmt_add_ops[0],
406
  & sfmt_andi_ops[0],
407
  & sfmt_add_ops[0],
408
  & sfmt_ori_ops[0],
409
  & sfmt_andhii_ops[0],
410
  & sfmt_rcsr_ops[0],
411
  & sfmt_sb_ops[0],
412
  & sfmt_sextb_ops[0],
413
  & sfmt_sextb_ops[0],
414
  & sfmt_sh_ops[0],
415
  & sfmt_sl_ops[0],
416
  & sfmt_addi_ops[0],
417
  & sfmt_sl_ops[0],
418
  & sfmt_addi_ops[0],
419
  & sfmt_sl_ops[0],
420
  & sfmt_addi_ops[0],
421
  & sfmt_add_ops[0],
422
  & sfmt_sw_ops[0],
423
  & sfmt_user_ops[0],
424
  & sfmt_wcsr_ops[0],
425
  & sfmt_add_ops[0],
426
  & sfmt_andi_ops[0],
427
  & sfmt_add_ops[0],
428
  & sfmt_andi_ops[0],
429
  & sfmt_break_ops[0],
430
  & sfmt_break_ops[0],
431
  & sfmt_bret_ops[0],
432
  & sfmt_bret_ops[0],
433
  & sfmt_bret_ops[0],
434
  & sfmt_sextb_ops[0],
435
  & sfmt_addi_ops[0],
436
  & sfmt_mvui_ops[0],
437
  & sfmt_andhii_ops[0],
438
  & sfmt_mva_ops[0],
439
  & sfmt_sextb_ops[0],
440
  & sfmt_nop_ops[0],
441
  & sfmt_lbgprel_ops[0],
442
  & sfmt_lbgprel_ops[0],
443
  & sfmt_lhgprel_ops[0],
444
  & sfmt_lhgprel_ops[0],
445
  & sfmt_lwgprel_ops[0],
446
  & sfmt_sbgprel_ops[0],
447
  & sfmt_shgprel_ops[0],
448
  & sfmt_swgprel_ops[0],
449
  & sfmt_lwgotrel_ops[0],
450
  & sfmt_orhigotoffi_ops[0],
451
  & sfmt_addgotoff_ops[0],
452
  & sfmt_swgotoff_ops[0],
453
  & sfmt_lwgotoff_ops[0],
454
  & sfmt_shgotoff_ops[0],
455
  & sfmt_lhgotoff_ops[0],
456
  & sfmt_lhgotoff_ops[0],
457
  & sfmt_sbgotoff_ops[0],
458
  & sfmt_lbgotoff_ops[0],
459
  & sfmt_lbgotoff_ops[0],
460
};
461
 
462
/* Function to call before using the operand instance table.  */
463
 
464
void
465
lm32_cgen_init_opinst_table (cd)
466
     CGEN_CPU_DESC cd;
467
{
468
  int i;
469
  const CGEN_OPINST **oi = & lm32_cgen_opinst_table[0];
470
  CGEN_INSN *insns = (CGEN_INSN *) cd->insn_table.init_entries;
471
  for (i = 0; i < MAX_INSNS; ++i)
472
    insns[i].opinst = oi[i];
473
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.