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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [gen_or1k_isa/] [sources/] [opcode/] [or32.c] - Blame information for rev 1646

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 133 markom
/* Table of opcodes for the OpenRISC 1000 ISA.
2
   Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
3
   Contributed by Damjan Lampret (lampret@opencores.org).
4
 
5 717 markom
This file is part of gen_or1k_isa, or1ksim, GDB and GAS.
6 133 markom
 
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2 of the License, or
10
(at your option) any later version.
11
 
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
GNU General Public License for more details.
16
 
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
20
 
21 1114 lampret
/*
22
 * $Log: not supported by cvs2svn $
23 1605 nogj
 * Revision 1.49  2005/11/06 16:23:07  nogj
24
 * Fix parsing the destination register
25
 *
26 1597 nogj
 * Revision 1.48  2005/11/03 19:01:50  lampret
27
 * Added l.fl1
28
 *
29 1590 lampret
 * Revision 1.47  2005/09/05 08:47:44  nogj
30
 * Fix most warnings issued by gcc4
31
 *
32 1557 nogj
 * Revision 1.46  2005/08/18 22:13:27  phoenix
33
 * fixed l.maci encoding
34
 *
35 1554 phoenix
 * Revision 1.45  2005/04/27 19:13:13  nogj
36
 * l.rfe does not have a delay slot.  Don't mark it as such.
37
 *
38 1475 nogj
 * Revision 1.44  2005/03/31 16:09:57  nogj
39
 * Implement a dynamic recompiler to speed up the execution
40
 *
41 1452 nogj
 * Revision 1.43  2005/03/31 16:01:59  nogj
42
 * Reclasify l.trap and l.sys to be an exception instruction
43
 *
44 1440 nogj
 * Revision 1.42  2005/03/16 12:25:56  nogj
45
 * Fix the parameters to the l.ff1/l.maci instructions
46
 *
47 1384 nogj
 * Revision 1.41  2005/02/09 17:41:03  nogj
48
 * Mark a simulated cpu address as such, by introducing the new oraddr_t type
49
 *
50 1350 nogj
 * Revision 1.40  2005/01/27 14:14:13  nogj
51
 * Remove the global op structure
52
 *
53 1346 nogj
 * Revision 1.39  2005/01/27 13:35:40  nogj
54
 *  * Fix generate.c to produce a execgen.c with less warnings.
55
 *  * Fix the --enable-simple configure option.
56
 *
57 1342 nogj
 * Revision 1.38  2005/01/27 13:15:50  nogj
58
 * Mark wich operand is the destination operand in the architechture definition
59
 *
60 1341 nogj
 * Revision 1.37  2005/01/11 15:41:58  andreje
61
 * l.ff1 instruction added
62
 *
63 1338 andreje
 * Revision 1.36  2004/07/22 20:17:23  phoenix
64
 * removed includes
65
 *
66 1309 phoenix
 * Revision 1.35  2004/07/19 23:07:37  phoenix
67
 * Gyorgy Jeney: extensive cleanup
68
 *
69 1308 phoenix
 * Revision 1.34  2004/06/27 22:56:48  lampret
70
 * Updated instruction set descriptions. Changed FP instructions encoding.
71
 *
72 1295 lampret
 * Revision 1.33  2004/05/09 19:52:31  lampret
73
 * Changed desciption of the l.cust5 insns
74
 *
75 1285 lampret
 * Revision 1.31  2003/07/01 19:34:49  csanchez
76
 * Added support for l.addc instruction.
77
 *
78 1169 csanchez
 * Revision 1.30  2003/01/28 03:49:24  lampret
79
 * Added cvs log keywords
80
 *
81 1114 lampret
 */
82
 
83 133 markom
#include <string.h>
84
#include <stdio.h>
85
#include <stdlib.h>
86 371 markom
#include <ctype.h>
87 133 markom
 
88 371 markom
 
89 138 markom
#ifdef HAVE_CONFIG_H
90
# include "config.h"
91
#endif
92 1342 nogj
#ifdef HAS_EXECUTION
93 1350 nogj
# ifdef HAVE_INTTYPES_H
94
#  include <inttypes.h> /* ...but to get arch.h we need uint{8,16,32}_t... */
95
# endif
96
# include "port.h"
97
# include "arch.h" /* ...but to get abstract.h, we need oraddr_t... */
98
# include "abstract.h" /* To get struct iqueue_entry... */
99 1557 nogj
# include "debug.h" /* To get debug() */
100 1342 nogj
#endif
101 133 markom
#include "opcode/or32.h"
102
 
103
/* **INDENT-OFF** */
104
 
105 1342 nogj
/* We treat all letters the same in encode/decode routines so
106
   we need to assign some characteristics to them like signess etc.*/
107 133 markom
CONST struct or32_letter or32_letters[] =
108
{
109
{ 'A', NUM_UNSIGNED },
110
{ 'B', NUM_UNSIGNED },
111
{ 'D', NUM_UNSIGNED },
112
{ 'I', NUM_SIGNED },
113
{ 'K', NUM_UNSIGNED },
114
{ 'L', NUM_UNSIGNED },
115
{ 'N', NUM_SIGNED },
116
{ '0', NUM_UNSIGNED },
117
{ '\0', 0 }     /* dummy entry */
118
};
119
 
120
/* Opcode encoding:
121
   machine[31:30]: first two bits of opcode
122
                   00 - neither of source operands is GPR
123
                   01 - second source operand is GPR (rB)
124
                   10 - first source operand is GPR (rA)
125
                   11 - both source operands are GPRs (rA and rB)
126
   machine[29:26]: next four bits of opcode
127
   machine[25:00]: instruction operands (specific to individual instruction)
128
 
129
  Recommendation: irrelevant instruction bits should be set with a value of
130
  bits in same positions of instruction preceding current instruction in the
131
  code (when assembling).
132
*/
133
 
134 1341 nogj
#ifdef HAS_EXECUTION
135
# if SIMPLE_EXECUTION
136
#  define EFN &l_none
137
#  define EF(func) &(func)
138
#  define EFI &l_invalid
139 1452 nogj
# elif COMPLEX_EXECUTION
140 1341 nogj
#  define EFN "l_none"
141
#  define EFI "l_invalid"
142
#  ifdef __GNUC__
143
#   define EF(func) #func
144
#  else
145
#   define EF(func) "func"
146
#  endif
147 1452 nogj
# else /* DYNAMIC_EXECUTION */
148
#  define EFN &l_none
149
#  define EF(func) &(gen_ ##func)
150
#  define EFI &gen_l_invalid
151
# endif
152 1341 nogj
#else /* HAS_EXECUTION */
153
# define EFN &l_none
154
# define EF(func) EFN
155
# define EFI EFN
156 133 markom
#endif /* HAS_EXECUTION */
157
 
158
CONST struct or32_opcode or32_opcodes[] =
159
{
160
 
161 1346 nogj
{ "l.j",       "N",            "00 0x0  NNNNN NNNNN NNNN NNNN NNNN NNNN",
162
  EF(l_j), OR32_IF_DELAY, it_jump },
163
{ "l.jal",     "N",            "00 0x1  NNNNN NNNNN NNNN NNNN NNNN NNNN",
164
  EF(l_jal), OR32_IF_DELAY, it_jump },
165
{ "l.bnf",     "N",            "00 0x3  NNNNN NNNNN NNNN NNNN NNNN NNNN",
166
  EF(l_bnf), OR32_IF_DELAY | OR32_R_FLAG, it_branch },
167
{ "l.bf",      "N",            "00 0x4  NNNNN NNNNN NNNN NNNN NNNN NNNN",
168
  EF(l_bf), OR32_IF_DELAY | OR32_R_FLAG, it_branch },
169
{ "l.nop",     "K",            "00 0x5  01--- ----- KKKK KKKK KKKK KKKK",
170
  EF(l_nop), 0, it_nop },
171
{ "l.movhi",   "rD,K",         "00 0x6  DDDDD ----0 KKKK KKKK KKKK KKKK",
172
  EF(l_movhi), 0, it_movimm },
173
{ "l.macrc",   "rD",           "00 0x6  DDDDD ----1 0000 0000 0000 0000",
174
  EF(l_macrc), 0, it_mac },
175
{ "l.sys",     "K",            "00 0x8  00000 00000 KKKK KKKK KKKK KKKK",
176 1440 nogj
  EF(l_sys), 0, it_exception },
177 1346 nogj
{ "l.trap",    "K",            "00 0x8  01000 00000 KKKK KKKK KKKK KKKK",
178 1440 nogj
  EF(l_trap), 0, it_exception },
179 1346 nogj
{ "l.msync",   "",             "00 0x8  10000 00000 0000 0000 0000 0000", EFN,
180
  0, it_unknown },
181
{ "l.psync",   "",             "00 0x8  10100 00000 0000 0000 0000 0000", EFN,
182
  0, it_unknown },
183
{ "l.csync",   "",             "00 0x8  11000 00000 0000 0000 0000 0000", EFN,
184
  0, it_unknown },
185
{ "l.rfe",     "",             "00 0x9  ----- ----- ---- ---- ---- ----",
186 1475 nogj
  EF(l_rfe), 0, it_exception },
187 1346 nogj
{ "lv.all_eq.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0x0", EFI, 0,
188
  it_unknown },
189
{ "lv.all_eq.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0x1", EFI, 0,
190
  it_unknown },
191
{ "lv.all_ge.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0x2", EFI, 0,
192
  it_unknown },
193
{ "lv.all_ge.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0x3", EFI, 0,
194
  it_unknown },
195
{ "lv.all_gt.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0x4", EFI, 0,
196
  it_unknown },
197
{ "lv.all_gt.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0x5", EFI, 0,
198
  it_unknown },
199
{ "lv.all_le.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0x6", EFI, 0,
200
  it_unknown },
201
{ "lv.all_le.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0x7", EFI, 0,
202
  it_unknown },
203
{ "lv.all_lt.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0x8", EFI, 0,
204
  it_unknown },
205
{ "lv.all_lt.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0x9", EFI, 0,
206
  it_unknown },
207
{ "lv.all_ne.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0xA", EFI, 0,
208
  it_unknown },
209
{ "lv.all_ne.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x1 0xB", EFI, 0,
210
  it_unknown },
211
{ "lv.any_eq.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0x0", EFI, 0,
212
  it_unknown },
213
{ "lv.any_eq.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0x1", EFI, 0,
214
  it_unknown },
215
{ "lv.any_ge.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0x2", EFI, 0,
216
  it_unknown },
217
{ "lv.any_ge.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0x3", EFI, 0,
218
  it_unknown },
219
{ "lv.any_gt.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0x4", EFI, 0,
220
  it_unknown },
221
{ "lv.any_gt.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0x5", EFI, 0,
222
  it_unknown },
223
{ "lv.any_le.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0x6", EFI, 0,
224
  it_unknown },
225
{ "lv.any_le.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0x7", EFI, 0,
226
  it_unknown },
227
{ "lv.any_lt.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0x8", EFI, 0,
228
  it_unknown },
229
{ "lv.any_lt.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0x9", EFI, 0,
230
  it_unknown },
231
{ "lv.any_ne.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0xA", EFI, 0,
232
  it_unknown },
233
{ "lv.any_ne.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x2 0xB", EFI, 0,
234
  it_unknown },
235
{ "lv.add.b",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0x0", EFI, 0,
236
  it_unknown },
237
{ "lv.add.h",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0x1", EFI, 0,
238
  it_unknown },
239
{ "lv.adds.b", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0x2", EFI, 0,
240
  it_unknown },
241
{ "lv.adds.h", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0x3", EFI, 0,
242
  it_unknown },
243
{ "lv.addu.b", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0x4", EFI, 0,
244
  it_unknown },
245
{ "lv.addu.h", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0x5", EFI, 0,
246
  it_unknown },
247
{ "lv.addus.b","rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0x6", EFI, 0,
248
  it_unknown },
249
{ "lv.addus.h","rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0x7", EFI, 0,
250
  it_unknown },
251
{ "lv.and",    "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0x8", EFI, 0,
252
  it_unknown },
253
{ "lv.avg.b",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0x9", EFI, 0,
254
  it_unknown },
255
{ "lv.avg.h",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x3 0xA", EFI, 0,
256
  it_unknown },
257
{ "lv.cmp_eq.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0x0", EFI, 0,
258
  it_unknown },
259
{ "lv.cmp_eq.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0x1", EFI, 0,
260
  it_unknown },
261
{ "lv.cmp_ge.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0x2", EFI, 0,
262
  it_unknown },
263
{ "lv.cmp_ge.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0x3", EFI, 0,
264
  it_unknown },
265
{ "lv.cmp_gt.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0x4", EFI, 0,
266
  it_unknown },
267
{ "lv.cmp_gt.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0x5", EFI, 0,
268
  it_unknown },
269
{ "lv.cmp_le.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0x6", EFI, 0,
270
  it_unknown },
271
{ "lv.cmp_le.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0x7", EFI, 0,
272
  it_unknown },
273
{ "lv.cmp_lt.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0x8", EFI, 0,
274
  it_unknown },
275
{ "lv.cmp_lt.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0x9", EFI, 0,
276
  it_unknown },
277
{ "lv.cmp_ne.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0xA", EFI, 0,
278
  it_unknown },
279
{ "lv.cmp_ne.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x4 0xB", EFI, 0,
280
  it_unknown },
281
{ "lv.madds.h","rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0x4", EFI, 0,
282
  it_unknown },
283
{ "lv.max.b",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0x5", EFI, 0,
284
  it_unknown },
285
{ "lv.max.h",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0x6", EFI, 0,
286
  it_unknown },
287
{ "lv.merge.b","rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0x7", EFI, 0,
288
  it_unknown },
289
{ "lv.merge.h","rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0x8", EFI, 0,
290
  it_unknown },
291
{ "lv.min.b",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0x9", EFI, 0,
292
  it_unknown },
293
{ "lv.min.h",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0xA", EFI, 0,
294
  it_unknown },
295
{ "lv.msubs.h","rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0xB", EFI, 0,
296
  it_unknown },
297
{ "lv.muls.h", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0xC", EFI, 0,
298
  it_unknown },
299
{ "lv.nand",   "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0xD", EFI, 0,
300
  it_unknown },
301
{ "lv.nor",    "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0xE", EFI, 0,
302
  it_unknown },
303
{ "lv.or",     "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x5 0xF", EFI, 0,
304
  it_unknown },
305
{ "lv.pack.b", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0x0", EFI, 0,
306
  it_unknown },
307
{ "lv.pack.h", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0x1", EFI, 0,
308
  it_unknown },
309
{ "lv.packs.b","rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0x2", EFI, 0,
310
  it_unknown },
311
{ "lv.packs.h","rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0x3", EFI, 0,
312
  it_unknown },
313
{ "lv.packus.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0x4", EFI, 0,
314
  it_unknown },
315
{ "lv.packus.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0x5", EFI, 0,
316
  it_unknown },
317
{ "lv.perm.n", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0x6", EFI, 0,
318
  it_unknown },
319
{ "lv.rl.b",   "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0x7", EFI, 0,
320
  it_unknown },
321
{ "lv.rl.h",   "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0x8", EFI, 0,
322
  it_unknown },
323
{ "lv.sll.b",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0x9", EFI, 0,
324
  it_unknown },
325
{ "lv.sll.h",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0xA", EFI, 0,
326
  it_unknown },
327
{ "lv.sll",    "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0xB", EFI, 0,
328
  it_unknown },
329
{ "lv.srl.b",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0xC", EFI, 0,
330
  it_unknown },
331
{ "lv.srl.h",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0xD", EFI, 0,
332
  it_unknown },
333
{ "lv.sra.b",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0xE", EFI, 0,
334
  it_unknown },
335
{ "lv.sra.h",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x6 0xF", EFI, 0,
336
  it_unknown },
337
{ "lv.srl",    "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0x0", EFI, 0,
338
  it_unknown },
339
{ "lv.sub.b",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0x1", EFI, 0,
340
  it_unknown },
341
{ "lv.sub.h",  "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0x2", EFI, 0,
342
  it_unknown },
343
{ "lv.subs.b", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0x3", EFI, 0,
344
  it_unknown },
345
{ "lv.subs.h", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0x4", EFI, 0,
346
  it_unknown },
347
{ "lv.subu.b", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0x5", EFI, 0,
348
  it_unknown },
349
{ "lv.subu.h", "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0x6", EFI, 0,
350
  it_unknown },
351
{ "lv.subus.b","rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0x7", EFI, 0,
352
  it_unknown },
353
{ "lv.subus.h","rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0x8", EFI, 0,
354
  it_unknown },
355
{ "lv.unpack.b","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0x9", EFI, 0,
356
  it_unknown },
357
{ "lv.unpack.h","rD,rA,rB",    "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0xA", EFI, 0,
358
  it_unknown },
359
{ "lv.xor",    "rD,rA,rB",     "00 0xA  DDDDD AAAAA BBBB B--- 0x7 0xB", EFI, 0,
360
  it_unknown },
361
{ "lv.cust1",  "",             "00 0xA  ----- ----- ---- ---- 0xC ----", EFI, 0,
362
  it_unknown },
363
{ "lv.cust2",  "",             "00 0xA  ----- ----- ---- ---- 0xD ----", EFI, 0,
364
  it_unknown },
365
{ "lv.cust3",  "",             "00 0xA  ----- ----- ---- ---- 0xE ----", EFI, 0,
366
  it_unknown },
367
{ "lv.cust4",  "",             "00 0xA  ----- ----- ---- ---- 0xF ----", EFI, 0,
368
  it_unknown },
369 676 markom
 
370 1346 nogj
{ "l.jr",      "rB",           "01 0x1  ----- ----- BBBB B--- ---- ----",
371
  EF(l_jr), OR32_IF_DELAY, it_jump },
372
{ "l.jalr",    "rB",           "01 0x2  ----- ----- BBBB B--- ---- ----",
373
  EF(l_jalr), OR32_IF_DELAY, it_jump },
374 1554 phoenix
{ "l.maci",    "rA,I",         "01 0x3  IIIII AAAAA ---- -III IIII IIII",
375 1346 nogj
  EF(l_mac), 0, it_mac },
376
{ "l.cust1",   "",             "01 0xC  ----- ----- ---- ---- ---- ----",
377
  EF(l_cust1), 0, it_unknown },
378
{ "l.cust2",   "",             "01 0xD  ----- ----- ---- ---- ---- ----",
379
  EF(l_cust2), 0, it_unknown },
380
{ "l.cust3",   "",             "01 0xE  ----- ----- ---- ---- ---- ----",
381
  EF(l_cust3), 0, it_unknown },
382
{ "l.cust4",   "",             "01 0xF  ----- ----- ---- ---- ---- ----",
383
  EF(l_cust4), 0, it_unknown },
384 133 markom
 
385 1346 nogj
{ "l.ld",      "rD,I(rA)",     "10 0x0  DDDDD AAAAA IIII IIII IIII IIII", EFI,
386
  0, it_load },
387
{ "l.lwz",     "rD,I(rA)",     "10 0x1  DDDDD AAAAA IIII IIII IIII IIII",
388
  EF(l_lwz), 0, it_load },
389
{ "l.lws",     "rD,I(rA)",     "10 0x2  DDDDD AAAAA IIII IIII IIII IIII", EFI,
390
  0, it_load },
391
{ "l.lbz",     "rD,I(rA)",     "10 0x3  DDDDD AAAAA IIII IIII IIII IIII",
392
  EF(l_lbz), 0, it_load },
393
{ "l.lbs",     "rD,I(rA)",     "10 0x4  DDDDD AAAAA IIII IIII IIII IIII",
394
  EF(l_lbs), 0, it_load },
395
{ "l.lhz",     "rD,I(rA)",     "10 0x5  DDDDD AAAAA IIII IIII IIII IIII",
396
  EF(l_lhz), 0, it_load },
397
{ "l.lhs",     "rD,I(rA)",     "10 0x6  DDDDD AAAAA IIII IIII IIII IIII",
398
  EF(l_lhs), 0, it_load },
399 133 markom
 
400 1346 nogj
{ "l.addi",    "rD,rA,I",      "10 0x7  DDDDD AAAAA IIII IIII IIII IIII",
401
  EF(l_add), OR32_W_FLAG, it_arith },
402
{ "l.addic",   "rD,rA,I",      "10 0x8  DDDDD AAAAA IIII IIII IIII IIII", EFI,
403
  0, it_arith },
404
{ "l.andi",    "rD,rA,K",      "10 0x9  DDDDD AAAAA KKKK KKKK KKKK KKKK",
405
  EF(l_and), OR32_W_FLAG, it_arith },
406
{ "l.ori",     "rD,rA,K",      "10 0xA  DDDDD AAAAA KKKK KKKK KKKK KKKK",
407
  EF(l_or), 0, it_arith },
408
{ "l.xori",    "rD,rA,I",      "10 0xB  DDDDD AAAAA IIII IIII IIII IIII",
409
  EF(l_xor), 0, it_arith },
410
{ "l.muli",    "rD,rA,I",      "10 0xC  DDDDD AAAAA IIII IIII IIII IIII",
411
  EF(l_mul), 0, it_arith },
412
{ "l.mfspr",   "rD,rA,K",      "10 0xD  DDDDD AAAAA KKKK KKKK KKKK KKKK",
413
  EF(l_mfspr), 0, it_move },
414
{ "l.slli",    "rD,rA,L",      "10 0xE  DDDDD AAAAA ---- ---- 00LL LLLL",
415
  EF(l_sll), 0, it_shift },
416
{ "l.srli",    "rD,rA,L",      "10 0xE  DDDDD AAAAA ---- ---- 01LL LLLL",
417
  EF(l_srl), 0, it_shift },
418
{ "l.srai",    "rD,rA,L",      "10 0xE  DDDDD AAAAA ---- ---- 10LL LLLL",
419
  EF(l_sra), 0, it_shift },
420
{ "l.rori",    "rD,rA,L",      "10 0xE  DDDDD AAAAA ---- ---- 11LL LLLL", EFI,
421
  0, it_shift },
422 133 markom
 
423 1346 nogj
{ "l.sfeqi",   "rA,I",         "10 0xF  00000 AAAAA IIII IIII IIII IIII",
424
  EF(l_sfeq), OR32_W_FLAG, it_compare },
425
{ "l.sfnei",   "rA,I",         "10 0xF  00001 AAAAA IIII IIII IIII IIII",
426
  EF(l_sfne), OR32_W_FLAG, it_compare },
427
{ "l.sfgtui",  "rA,I",         "10 0xF  00010 AAAAA IIII IIII IIII IIII",
428
  EF(l_sfgtu), OR32_W_FLAG, it_compare },
429
{ "l.sfgeui",  "rA,I",         "10 0xF  00011 AAAAA IIII IIII IIII IIII",
430
  EF(l_sfgeu), OR32_W_FLAG, it_compare },
431
{ "l.sfltui",  "rA,I",         "10 0xF  00100 AAAAA IIII IIII IIII IIII",
432
  EF(l_sfltu), OR32_W_FLAG, it_compare },
433
{ "l.sfleui",  "rA,I",         "10 0xF  00101 AAAAA IIII IIII IIII IIII",
434
  EF(l_sfleu), OR32_W_FLAG, it_compare },
435
{ "l.sfgtsi",  "rA,I",         "10 0xF  01010 AAAAA IIII IIII IIII IIII",
436
  EF(l_sfgts), OR32_W_FLAG, it_compare },
437
{ "l.sfgesi",  "rA,I",         "10 0xF  01011 AAAAA IIII IIII IIII IIII",
438
  EF(l_sfges), OR32_W_FLAG, it_compare },
439
{ "l.sfltsi",  "rA,I",         "10 0xF  01100 AAAAA IIII IIII IIII IIII",
440
  EF(l_sflts), OR32_W_FLAG, it_compare },
441
{ "l.sflesi",  "rA,I",         "10 0xF  01101 AAAAA IIII IIII IIII IIII",
442
  EF(l_sfles), OR32_W_FLAG, it_compare },
443 133 markom
 
444 1346 nogj
{ "l.mtspr",   "rA,rB,K",      "11 0x0  KKKKK AAAAA BBBB BKKK KKKK KKKK",
445
  EF(l_mtspr), 0, it_move },
446
{ "l.mac",     "rA,rB",        "11 0x1  ----- AAAAA BBBB B--- ---- 0x1",
447
  EF(l_mac), 0, it_mac },
448
{ "l.msb",     "rA,rB",        "11 0x1  ----- AAAAA BBBB B--- ---- 0x2",
449
  EF(l_msb), 0, it_mac },
450 133 markom
 
451 1346 nogj
{ "lf.add.s",   "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x0 0x0",
452
  EF(lf_add_s), 0, it_float },
453
{ "lf.sub.s",   "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x0 0x1",
454
  EF(lf_sub_s), 0, it_float },
455
{ "lf.mul.s",   "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x0 0x2",
456
  EF(lf_mul_s), 0, it_float },
457
{ "lf.div.s",   "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x0 0x3",
458
  EF(lf_div_s), 0, it_float },
459
{ "lf.itof.s",  "rD,rA",       "11 0x2  DDDDD AAAAA 0000 0--- 0x0 0x4",
460
  EF(lf_itof_s), 0, it_float },
461
{ "lf.ftoi.s",  "rD,rA",       "11 0x2  DDDDD AAAAA 0000 0--- 0x0 0x5",
462
  EF(lf_ftoi_s), 0, it_float },
463
{ "lf.rem.s",   "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x0 0x6",
464
  EF(lf_rem_s), 0, it_float },
465
{ "lf.madd.s",  "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x0 0x7",
466
  EF(lf_madd_s), 0, it_float },
467
{ "lf.sfeq.s",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x0 0x8",
468
  EF(lf_sfeq_s), 0, it_float },
469
{ "lf.sfne.s",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x0 0x9",
470
  EF(lf_sfne_s), 0, it_float },
471
{ "lf.sfgt.s",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x0 0xA",
472
  EF(lf_sfgt_s), 0, it_float },
473
{ "lf.sfge.s",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x0 0xB",
474
  EF(lf_sfge_s), 0, it_float },
475
{ "lf.sflt.s",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x0 0xC",
476
  EF(lf_sflt_s), 0, it_float },
477
{ "lf.sfle.s",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x0 0xD",
478
  EF(lf_sfle_s), 0, it_float },
479
{ "lf.cust1.s", "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0xD ----", EFI,
480
  0, it_float },
481 133 markom
 
482 1346 nogj
{ "lf.add.d",   "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x1 0x0", EFI, 0,
483
  it_float },
484
{ "lf.sub.d",   "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x1 0x1", EFI, 0,
485
  it_float },
486
{ "lf.mul.d",   "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x1 0x2", EFI, 0,
487
  it_float },
488
{ "lf.div.d",   "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x1 0x3", EFI, 0,
489
  it_float },
490
{ "lf.itof.d",  "rD,rA",       "11 0x2  DDDDD AAAAA 0000 0--- 0x1 0x4", EFI, 0,
491
  it_float },
492
{ "lf.ftoi.d",  "rD,rA",       "11 0x2  DDDDD AAAAA 0000 0--- 0x1 0x5", EFI, 0,
493
  it_float },
494
{ "lf.rem.d",   "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x1 0x6", EFI, 0,
495
  it_float },
496
{ "lf.madd.d",  "rD,rA,rB",    "11 0x2  DDDDD AAAAA BBBB B--- 0x1 0x7", EFI, 0,
497
  it_float },
498
{ "lf.sfeq.d",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x1 0x8", EFI, 0,
499
  it_float },
500
{ "lf.sfne.d",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x1 0x9", EFI, 0,
501
  it_float },
502
{ "lf.sfgt.d",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x1 0xA", EFI, 0,
503
  it_float },
504
{ "lf.sfge.d",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x1 0xB", EFI, 0,
505
  it_float },
506
{ "lf.sflt.d",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x1 0xC", EFI, 0,
507
  it_float },
508
{ "lf.sfle.d",  "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0x1 0xD", EFI, 0,
509
  it_float },
510
{ "lf.cust1.d", "rA,rB",       "11 0x2  ----- AAAAA BBBB B--- 0xE ----", EFI, 0,
511
  it_float },
512 676 markom
 
513 1346 nogj
{ "l.sd",      "I(rD),rB",     "11 0x4  IIIII DDDDD BBBB BIII IIII IIII", EFI,
514
  0, it_store },
515
{ "l.sw",      "I(rD),rB",     "11 0x5  IIIII DDDDD BBBB BIII IIII IIII",
516
  EF(l_sw), 0, it_store },
517
{ "l.sb",      "I(rD),rB",     "11 0x6  IIIII DDDDD BBBB BIII IIII IIII",
518
  EF(l_sb), 0, it_store },
519
{ "l.sh",      "I(rD),rB",     "11 0x7  IIIII DDDDD BBBB BIII IIII IIII",
520
  EF(l_sh), 0, it_store },
521 1295 lampret
 
522 1346 nogj
{ "l.add",     "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 ---- 0x0",
523
  EF(l_add), OR32_W_FLAG, it_arith },
524
{ "l.addc",    "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 ---- 0x1",
525
  EF(l_addc), OR32_W_FLAG, it_arith },
526
{ "l.sub",     "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 ---- 0x2",
527
  EF(l_sub), 0, it_arith },
528
{ "l.and",     "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 ---- 0x3",
529
  EF(l_and), OR32_W_FLAG, it_arith },
530
{ "l.or",      "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 ---- 0x4",
531
  EF(l_or), 0, it_arith },
532
{ "l.xor",     "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 ---- 0x5",
533
  EF(l_xor), 0, it_arith },
534
{ "l.mul",     "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-11 ---- 0x6",
535
  EF(l_mul), 0, it_arith },
536 1295 lampret
 
537 1346 nogj
{ "l.sll",     "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 00-- 0x8",
538
  EF(l_sll), 0, it_shift },
539
{ "l.srl",     "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 01-- 0x8",
540
  EF(l_srl), 0, it_shift },
541
{ "l.sra",     "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 10-- 0x8",
542
  EF(l_sra), 0, it_shift },
543
{ "l.ror",     "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 11-- 0x8", EFI,
544
  0, it_shift },
545
{ "l.div",     "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-11 ---- 0x9",
546
  EF(l_div), 0, it_arith },
547
{ "l.divu",    "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-11 ---- 0xA",
548
  EF(l_divu), 0, it_arith },
549
{ "l.mulu",    "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-11 ---- 0xB", EFI,
550
  0, it_arith },
551
{ "l.extbs",   "rD,rA",     "11 0x8  DDDDD AAAAA ---- --00 01-- 0xC",
552
  EF(l_extbs), 0, it_move },
553
{ "l.exths",   "rD,rA",     "11 0x8  DDDDD AAAAA ---- --00 00-- 0xC",
554
  EF(l_exths), 0, it_move },
555
{ "l.extws",   "rD,rA",     "11 0x8  DDDDD AAAAA ---- --00 00-- 0xD",
556
  EF(l_extws), 0, it_move },
557
{ "l.extbz",   "rD,rA",     "11 0x8  DDDDD AAAAA ---- --00 11-- 0xC",
558
  EF(l_extbz), 0, it_move },
559
{ "l.exthz",   "rD,rA",     "11 0x8  DDDDD AAAAA ---- --00 10-- 0xC",
560
  EF(l_exthz), 0, it_move },
561
{ "l.extwz",   "rD,rA",     "11 0x8  DDDDD AAAAA ---- --00 01-- 0xD",
562
  EF(l_extwz), 0, it_move },
563
{ "l.cmov",    "rD,rA,rB",     "11 0x8  DDDDD AAAAA BBBB B-00 ---- 0xE",
564
  EF(l_cmov), OR32_R_FLAG, it_move },
565 1605 nogj
{ "l.ff1",     "rD,rA",     "11 0x8  DDDDD AAAAA ---- --00 ---- 0xF",
566
  EF(l_ff1), 0, it_arith },
567 1590 lampret
{ "l.fl1",     "rD,rA",     "11 0x8  DDDDD AAAAA ---- --01 ---- 0xF", EFI, 0,
568
  it_arith },
569 133 markom
 
570 1346 nogj
{ "l.sfeq",    "rA,rB",        "11 0x9  00000 AAAAA BBBB B--- ---- ----",
571
  EF(l_sfeq), OR32_W_FLAG, it_compare },
572
{ "l.sfne",    "rA,rB",        "11 0x9  00001 AAAAA BBBB B--- ---- ----",
573
  EF(l_sfne), OR32_W_FLAG, it_compare },
574
{ "l.sfgtu",   "rA,rB",        "11 0x9  00010 AAAAA BBBB B--- ---- ----",
575
  EF(l_sfgtu), OR32_W_FLAG, it_compare },
576
{ "l.sfgeu",   "rA,rB",        "11 0x9  00011 AAAAA BBBB B--- ---- ----",
577
  EF(l_sfgeu), OR32_W_FLAG, it_compare },
578
{ "l.sfltu",   "rA,rB",        "11 0x9  00100 AAAAA BBBB B--- ---- ----",
579
  EF(l_sfltu), OR32_W_FLAG, it_compare },
580
{ "l.sfleu",   "rA,rB",        "11 0x9  00101 AAAAA BBBB B--- ---- ----",
581
  EF(l_sfleu), OR32_W_FLAG, it_compare },
582
{ "l.sfgts",   "rA,rB",        "11 0x9  01010 AAAAA BBBB B--- ---- ----",
583
  EF(l_sfgts), OR32_W_FLAG, it_compare },
584
{ "l.sfges",   "rA,rB",        "11 0x9  01011 AAAAA BBBB B--- ---- ----",
585
  EF(l_sfges), OR32_W_FLAG, it_compare },
586
{ "l.sflts",   "rA,rB",        "11 0x9  01100 AAAAA BBBB B--- ---- ----",
587
  EF(l_sflts), OR32_W_FLAG, it_compare },
588
{ "l.sfles",   "rA,rB",        "11 0x9  01101 AAAAA BBBB B--- ---- ----",
589
  EF(l_sfles), OR32_W_FLAG, it_compare },
590 676 markom
 
591 1346 nogj
{ "l.cust5",   "rD,rA,rB,L,K", "11 0xC  DDDDD AAAAA BBBB BLLL LLLK KKKK", EFI,
592
  0, it_unknown },
593
{ "l.cust6",   "",             "11 0xD  ----- ----- ---- ---- ---- ----", EFI,
594
  0, it_unknown },
595
{ "l.cust7",   "",             "11 0xE  ----- ----- ---- ---- ---- ----", EFI,
596
  0, it_unknown },
597
{ "l.cust8",   "",             "11 0xF  ----- ----- ---- ---- ---- ----", EFI,
598
  0, it_unknown },
599 133 markom
 
600 221 markom
/* This section should not be defined in or1ksim, since it contains duplicates,
601
   which would cause machine builder to complain.  */
602 374 simons
#ifdef HAS_CUST
603 1346 nogj
{ "l.cust5_1",   "rD",         "11 0xC  DDDDD ----- ---- ---- ---- ----", EFI,
604
  0, it_unknown },
605
{ "l.cust5_2",   "rD,rA"   ,   "11 0xC  DDDDD AAAAA ---- ---- ---- ----", EFI,
606
  0, it_unknown },
607
{ "l.cust5_3",   "rD,rA,rB",   "11 0xC  DDDDD AAAAA BBBB B--- ---- ----", EFI,
608
  0, it_unknown },
609 221 markom
 
610 1346 nogj
{ "l.cust6_1",   "rD",         "11 0xD  DDDDD ----- ---- ---- ---- ----", EFI,
611
  0, it_unknown },
612
{ "l.cust6_2",   "rD,rA"   ,   "11 0xD  DDDDD AAAAA ---- ---- ---- ----", EFI,
613
  0, it_unknown },
614
{ "l.cust6_3",   "rD,rA,rB",   "11 0xD  DDDDD AAAAA BBBB B--- ---- ----", EFI,
615
  0, it_unknown },
616 221 markom
 
617 1346 nogj
{ "l.cust7_1",   "rD",         "11 0xE  DDDDD ----- ---- ---- ---- ----", EFI,
618
  0, it_unknown },
619
{ "l.cust7_2",   "rD,rA"   ,   "11 0xE  DDDDD AAAAA ---- ---- ---- ----", EFI,
620
  0, it_unknown },
621
{ "l.cust7_3",   "rD,rA,rB",   "11 0xE  DDDDD AAAAA BBBB B--- ---- ----", EFI,
622
  0, it_unknown },
623 221 markom
 
624 1346 nogj
{ "l.cust8_1",   "rD",         "11 0xF  DDDDD ----- ---- ---- ---- ----", EFI,
625
  0, it_unknown },
626
{ "l.cust8_2",   "rD,rA"   ,   "11 0xF  DDDDD AAAAA ---- ---- ---- ----", EFI,
627
  0, it_unknown },
628
{ "l.cust8_3",   "rD,rA,rB",   "11 0xF  DDDDD AAAAA BBBB B--- ---- ----", EFI,
629
  0, it_unknown },
630 221 markom
#endif
631
 
632 1346 nogj
{ "", "", "", EFI, 0, 0 }  /* Dummy entry, not included in num_opcodes.  This
633
                            * lets code examine entry i+1 without checking
634
                            * if we've run off the end of the table.  */
635 133 markom
};
636
 
637
#undef EFI
638
#undef EFN
639
#undef EF 
640
 
641
/* **INDENT-ON** */
642
 
643 371 markom
/* Define dummy, if debug is not defined.  */
644 1341 nogj
#ifndef HAS_DEBUG
645
#define debug(l, fmt...) ;
646 371 markom
#endif
647 133 markom
 
648 371 markom
CONST int num_opcodes = ((sizeof(or32_opcodes)) / (sizeof(struct or32_opcode))) - 1;
649
 
650 138 markom
/* Calculates instruction length in bytes. Always 4 for OR32. */
651
int
652
insn_len(int insn_index)
653 133 markom
{
654
  insn_index = 0; /* Just to get rid that warning.  */
655
  return 4;
656
}
657
 
658
/* Is individual insn's operand signed or unsigned? */
659 138 markom
int
660
letter_signed(char l)
661 133 markom
{
662
  CONST struct or32_letter *pletter;
663
 
664
  for(pletter = or32_letters; pletter->letter != '\0'; pletter++)
665
    if (pletter->letter == l)
666
      return pletter->sign;
667
 
668
  printf("letter_signed(%c): Unknown letter.\n", l);
669
  return 0;
670
}
671
 
672 703 markom
/* Simple cache for letter ranges */
673
static int range_cache[256] = {0};
674
 
675 133 markom
/* Number of letters in the individual lettered operand. */
676 138 markom
int
677
letter_range(char l)
678 133 markom
{
679
  CONST struct or32_opcode *pinsn;
680
  char *enc;
681
  int range = 0;
682 703 markom
 
683
  /* Is value cached? */
684 1308 phoenix
  if ((range = range_cache[(unsigned char)l])) return range;
685 133 markom
 
686 138 markom
  for(pinsn = or32_opcodes; strlen(pinsn->name); pinsn++)
687
    {
688
      if (strchr(pinsn->encoding,l))
689
        {
690
          for (enc = pinsn->encoding; *enc != '\0'; enc++)
691
            if ((*enc == '0') && (*(enc+1) == 'x'))
692
              enc += 2;
693
            else if (*enc == l)
694
              range++;
695 703 markom
          return range_cache[(unsigned char)l] = range;
696 133 markom
        }
697
    }
698 703 markom
 
699 133 markom
  printf("\nABORT: letter_range(%c): Never used letter.\n", l);
700
  exit(1);
701
}
702
 
703
/* MM: Returns index of given instruction name.  */
704 138 markom
int
705
insn_index (char *insn)
706
{
707 133 markom
  int i, found = -1;
708 371 markom
  for (i = 0; i < num_opcodes; i++)
709 138 markom
    if (!strcmp (or32_opcodes[i].name, insn))
710
      {
711
        found = i;
712
        break;
713
      }
714 133 markom
  return found;
715
}
716
 
717 717 markom
/* Returns name of the specified instruction index */
718
CONST char *
719
insn_name(int index)
720 138 markom
{
721 371 markom
  if (index >= 0 && index < num_opcodes)
722 133 markom
    return or32_opcodes[index].name;
723
  else
724
    return "???";
725
}
726
 
727 1342 nogj
#if defined(HAS_EXECUTION) && SIMPLE_EXECUTION
728 717 markom
void
729 1342 nogj
l_none(struct iqueue_entry *current)
730
{
731
}
732 1452 nogj
#elif defined(HAS_EXECUTION) && DYNAMIC_EXECUTION
733
void
734
l_none(struct op_queue *opq, int *param_t, orreg_t *param, int delay_slot)
735
{
736
}
737 1342 nogj
#else
738
void
739 717 markom
l_none()
740 138 markom
{
741 133 markom
}
742 1342 nogj
#endif
743 133 markom
 
744
/*** Finite automata for instruction decoding building code ***/
745
 
746 1341 nogj
/* Find symbols in encoding.  */
747 706 markom
unsigned long
748 133 markom
insn_extract(param_ch, enc_initial)
749
     char param_ch;
750
     char *enc_initial;
751
{
752
  char *enc;
753
  unsigned long ret = 0;
754
  unsigned opc_pos = 32;
755
  for (enc = enc_initial; *enc != '\0'; )
756
    if ((*enc == '0') && (*(enc+1) == 'x'))
757
      {
758
        unsigned long tmp = strtol(enc+2, NULL, 16);
759
        opc_pos -= 4;
760 138 markom
        if (param_ch == '0' || param_ch == '1')
761
          {
762
            if (param_ch == '0')
763
              tmp = 15 - tmp;
764
            ret |= tmp << opc_pos;
765
          }
766 133 markom
        enc += 3;
767
      }
768 138 markom
    else
769
      {
770
        if (*enc == '0' || *enc == '1' || *enc == '-' || isalpha(*enc) )
771
          {
772
            opc_pos--;
773
            if (param_ch == *enc)
774
              ret |= 1 << opc_pos;
775
          }
776
        enc++;
777 133 markom
      }
778
  return ret;
779
}
780
 
781 138 markom
#define MAX_AUTOMATA_SIZE (1200)
782
#define MAX_OP_TABLE_SIZE (1200)
783 133 markom
#define MAX_LEN           (8)
784
 
785
#ifndef MIN
786
# define MIN(x,y)          ((x) < (y) ? (x) : (y))
787
#endif
788
 
789
unsigned long *automata;
790
int nuncovered;
791
int curpass = 0;
792
 
793 1341 nogj
/* MM: Struct that holds runtime build information about instructions.  */
794 1342 nogj
struct temp_insn_struct *ti;
795 138 markom
 
796
struct insn_op_struct *op_data, **op_start;
797
 
798
/* Recursive utility function used to find best match and to build automata.  */
799
 
800
static unsigned long *
801
cover_insn (unsigned long *cur, int pass, unsigned int mask)
802
{
803 133 markom
  int best_first = 0, best_len = 0, i, last_match = -1, ninstr = 0;
804
  unsigned long cur_mask = mask;
805
  unsigned long *next;
806
 
807
  for (i = 0; i < num_opcodes; i++)
808 138 markom
    if (ti[i].in_pass == pass)
809
      {
810
        cur_mask &= ti[i].insn_mask;
811
        ninstr++;
812
        last_match = i;
813
      }
814
 
815 344 markom
  debug(8, "%08X %08X\n", mask, cur_mask);
816 138 markom
  if (ninstr == 0)
817
    return 0;
818
  if (ninstr == 1)
819
    {
820
      /* Leaf holds instruction index. */
821 344 markom
      debug(8, "%i>I%i %s\n", cur - automata, last_match, or32_opcodes[last_match].name);
822 138 markom
      *cur = LEAF_FLAG | last_match;
823
      cur++;
824
      nuncovered--;
825
    } else {
826
      /* Find longest match.  */
827
      for (i = 0; i < 32; i++)
828
        {
829
          int len;
830
          for (len = best_len + 1; len < MIN(MAX_LEN, 33 - i); len++)
831
            {
832
              unsigned long m = (1UL << ((unsigned long)len)) - 1;
833 344 markom
              debug(9, " (%i(%08X & %08X>>%i = %08X, %08X)",len,m, cur_mask, i, (cur_mask >> (unsigned)i), (cur_mask >> (unsigned)i) & m);
834 138 markom
              if ((m & (cur_mask >> (unsigned)i)) == m)
835
                {
836
                  best_len = len;
837
                  best_first = i;
838 344 markom
                  debug(9, "!");
839 138 markom
                }
840
              else
841
                break;
842
            }
843
        }
844 344 markom
      debug(9, "\n");
845 138 markom
      if (!best_len)
846
        {
847
          fprintf (stderr, "%i instructions match mask 0x%08X:\n", ninstr, mask);
848
          for (i = 0; i < num_opcodes; i++)
849
            if (ti[i].in_pass == pass)
850
              fprintf (stderr, "%s ", or32_opcodes[i].name);
851
 
852
          fprintf (stderr, "\n");
853
          exit (1);
854
        }
855 344 markom
      debug(8, "%i> #### %i << %i (%i) ####\n", cur - automata, best_len, best_first, ninstr);
856 138 markom
      *cur = best_first;
857
      cur++;
858
      *cur = (1 << best_len) - 1;
859
      cur++;
860
      next = cur;
861
      /* Allocate space for pointers.  */
862
      cur += 1 << best_len;
863
      cur_mask = (1 << (unsigned long)best_len) - 1;
864
 
865
      for (i = 0; i < (1 << (unsigned long)best_len); i++)
866
        {
867
          int j;
868
          unsigned long *c;
869
          curpass++;
870
          for (j = 0; j < num_opcodes; j++)
871
            if (ti[j].in_pass == pass
872 371 markom
                && ((ti[j].insn >> best_first) & cur_mask) == (unsigned long) i
873 138 markom
                && ((ti[j].insn_mask >> best_first) & cur_mask) == cur_mask)
874
              ti[j].in_pass = curpass;
875
 
876 344 markom
          debug(9, "%08X %08X %i\n", mask, cur_mask, best_first);
877 138 markom
          c = cover_insn (cur, curpass, mask & (~(cur_mask << best_first)));
878
          if (c)
879
            {
880 344 markom
              debug(8, "%i> #%X -> %u\n", next - automata, i, cur - automata);
881 138 markom
              *next = cur - automata;
882
              cur = c;
883
            }
884
          else
885
            {
886 344 markom
              debug(8, "%i> N/A\n", next - automata);
887 138 markom
              *next = 0;
888
            }
889
          next++;
890
        }
891 133 markom
    }
892 138 markom
  return cur;
893
}
894 133 markom
 
895 138 markom
/* Returns number of nonzero bits. */
896
static int
897
num_ones (unsigned long value)
898
{
899
  int c = 0;
900
  while (value)
901
    {
902
      if (value & 1)
903
        c++;
904
      value >>= 1;
905 133 markom
    }
906 138 markom
  return c;
907
}
908 133 markom
 
909 138 markom
/* Utility function, which converts parameters from or32_opcode format to more binary form.
910
   Parameters are stored in ti struct.  */
911
 
912
static struct insn_op_struct *
913
parse_params (CONST struct or32_opcode *opcode, struct insn_op_struct *cur)
914
{
915
  char *args = opcode->args;
916
  int i, type;
917 1346 nogj
  int num_cur_op = 0;;
918 138 markom
 
919
  i = 0;
920
  type = 0;
921 262 markom
  /* In case we don't have any parameters, we add dummy read from r0.  */
922
  if (!(*args)) {
923 263 markom
    cur->type = OPTYPE_REG | OPTYPE_OP | OPTYPE_LAST;
924 262 markom
    cur->data = 0;
925 355 markom
    debug(9, "#%08X %08X\n", cur->type, cur->data);
926 262 markom
    cur++;
927
    return cur;
928
  }
929
 
930 138 markom
  while (*args != '\0')
931
    {
932
      if (*args == 'r')
933
        {
934
          args++;
935
          type |= OPTYPE_REG;
936 1597 nogj
          if(*args == 'D')
937 1341 nogj
            type |= OPTYPE_DST;
938 133 markom
        }
939 138 markom
      else if (isalpha (*args))
940
        {
941
          unsigned long arg;
942
          arg = insn_extract(*args, opcode->encoding);
943 355 markom
          debug(9, "%s : %08X ------\n", opcode->name, arg);
944 138 markom
          if (letter_signed (*args))
945
            {
946
              type |= OPTYPE_SIG;
947
              type |= ((num_ones (arg) - 1) << OPTYPE_SBIT_SHR) & OPTYPE_SBIT;
948
            }
949
 
950 1346 nogj
          num_cur_op = 0;
951 138 markom
          /* Split argument to sequences of consecutive ones.  */
952
          while (arg)
953
            {
954
              int shr = 0;
955
              unsigned long tmp = arg, mask = 0;
956
              while ((tmp & 1) == 0)
957
                {
958
                  shr++;
959
                  tmp >>= 1;
960
                }
961
              while (tmp & 1)
962
                {
963
                  mask++;
964
                  tmp >>= 1;
965
                }
966
              cur->type = type | shr;
967
              cur->data = mask;
968
              arg &= ~(((1 << mask) - 1) << shr);
969 355 markom
              debug(6, "|%08X %08X\n", cur->type, cur->data);
970 138 markom
              cur++;
971 1346 nogj
              num_cur_op++;
972 138 markom
            }
973
          args++;
974
        }
975
      else if (*args == '(')
976
        {
977
          /* Next param is displacement.  Later we will treat them as one operand.  */
978 1346 nogj
          /* Set the OPTYPE_DIS flag on all insn_op_structs that belong to this
979
           * operand */
980
          while(num_cur_op > 0) {
981
            cur[-num_cur_op].type |= type | OPTYPE_DIS;
982
            num_cur_op--;
983
          }
984
          cur[-1].type |= OPTYPE_OP;
985 355 markom
          debug(9, ">%08X %08X\n", cur->type, cur->data);
986 138 markom
          type = 0;
987
          i++;
988
          args++;
989
        }
990
      else if (*args == OPERAND_DELIM)
991
        {
992
          cur--;
993
          cur->type = type | cur->type | OPTYPE_OP;
994 355 markom
          debug(9, ">%08X %08X\n", cur->type, cur->data);
995 138 markom
          cur++;
996
          type = 0;
997
          i++;
998
          args++;
999
        }
1000
      else if (*args == '0')
1001
        {
1002
          cur->type = type;
1003
          cur->data = 0;
1004 355 markom
          debug(9, ">%08X %08X\n", cur->type, cur->data);
1005 138 markom
          cur++;
1006
          type = 0;
1007
          i++;
1008
          args++;
1009
        }
1010
      else if (*args == ')')
1011
        args++;
1012
      else
1013
        {
1014
          fprintf (stderr, "%s : parse error in args.\n", opcode->name);
1015
          exit (1);
1016
        }
1017 133 markom
    }
1018 138 markom
  cur--;
1019
  cur->type = type | cur->type | OPTYPE_OP | OPTYPE_LAST;
1020 355 markom
  debug(9, "#%08X %08X\n", cur->type, cur->data);
1021 138 markom
  cur++;
1022 133 markom
  return cur;
1023
}
1024
 
1025 138 markom
/* Constructs new automata based on or32_opcodes array.  */
1026
 
1027
void
1028
build_automata()
1029
{
1030 371 markom
  int i;
1031 133 markom
  unsigned long *end;
1032 138 markom
  struct insn_op_struct *cur;
1033
 
1034 133 markom
  automata = (unsigned long *) malloc (MAX_AUTOMATA_SIZE * sizeof (unsigned long));
1035 138 markom
  ti = (struct temp_insn_struct *) malloc (sizeof (struct temp_insn_struct) * num_opcodes);
1036 133 markom
 
1037
  nuncovered = num_opcodes;
1038 709 markom
 
1039
#ifdef HAS_EXECUTION
1040 138 markom
  printf("Building automata... ");
1041 709 markom
#endif
1042
 
1043 133 markom
  /* Build temporary information about instructions.  */
1044 138 markom
  for (i = 0; i < num_opcodes; i++)
1045
    {
1046
      unsigned long ones, zeros;
1047
      char *encoding = or32_opcodes[i].encoding;
1048
      ones  = insn_extract('1', encoding);
1049
      zeros = insn_extract('0', encoding);
1050
      ti[i].insn_mask = ones | zeros;
1051
      ti[i].insn = ones;
1052
      ti[i].in_pass = curpass = 0;
1053 344 markom
      /*debug(9, "%s: %s %08X %08X\n", or32_opcodes[i].name,
1054 138 markom
        or32_opcodes[i].encoding, ti[i].insn_mask, ti[i].insn);*/
1055
    }
1056 133 markom
 
1057
  /* Until all are covered search for best criteria to separate them.  */
1058 138 markom
  end = cover_insn (automata, curpass, 0xFFFFFFFF);
1059
  if (end - automata > MAX_AUTOMATA_SIZE)
1060
    {
1061
      fprintf (stderr, "Automata too large. Increase MAX_AUTOMATA_SIZE.");
1062
      exit (1);
1063
    }
1064 709 markom
#ifdef HAS_EXECUTION
1065 138 markom
  printf("done, num uncovered: %i/%i.\n", nuncovered, num_opcodes);
1066 709 markom
#endif
1067 371 markom
 
1068 709 markom
#ifdef HAS_EXECUTION
1069 138 markom
  printf("Parsing operands data... ");
1070 709 markom
#endif
1071 138 markom
  op_data = (struct insn_op_struct *) malloc (MAX_OP_TABLE_SIZE * sizeof (struct insn_op_struct));
1072
  op_start = (struct insn_op_struct **) malloc (num_opcodes * sizeof (struct insn_op_struct *));
1073
  cur = op_data;
1074
  for (i = 0; i < num_opcodes; i++)
1075
    {
1076
      op_start[i] = cur;
1077
      cur = parse_params (&or32_opcodes[i], cur);
1078
      if (cur - op_data > MAX_OP_TABLE_SIZE)
1079
        {
1080
          fprintf (stderr, "Operands table too small, increase MAX_OP_TABLE_SIZE.\n");
1081
          exit (1);
1082
        }
1083
    }
1084 709 markom
#ifdef HAS_EXECUTION
1085 138 markom
  printf("done.\n");
1086 709 markom
#endif
1087 133 markom
}
1088
 
1089 138 markom
void destruct_automata ()
1090
{
1091
  free (ti);
1092 133 markom
  free (automata);
1093 138 markom
  free (op_data);
1094
  free (op_start);
1095 133 markom
}
1096
 
1097
/* Decodes instruction and returns instruction index.  */
1098 138 markom
int insn_decode (unsigned int insn)
1099
{
1100 133 markom
  unsigned long *a = automata;
1101 138 markom
  int i;
1102
  while (!(*a & LEAF_FLAG))
1103
    {
1104
      unsigned int first = *a;
1105 703 markom
      //debug(9, "%i ", a - automata);
1106 138 markom
      a++;
1107
      i = (insn >> first) & *a;
1108
      a++;
1109
      if (!*(a + i))
1110
        { /* Invalid instruction found?  */
1111 703 markom
          //debug(9, "XXX\n", i);
1112 138 markom
          return -1;
1113
        }
1114
      a = automata + *(a + i);
1115
    }
1116
  i = *a & ~LEAF_FLAG;
1117 703 markom
  //debug(9, "%i\n", i);
1118 138 markom
  /* Final check - do we have direct match?
1119
     (based on or32_opcodes this should be the only possibility,
1120
     but in case of invalid/missing instruction we must perform a check)  */
1121
  if ((ti[i].insn_mask & insn) == ti[i].insn)
1122
    return i;
1123
  else
1124
    return -1;
1125 133 markom
}
1126 371 markom
 
1127
static char disassembled_str[50];
1128
char *disassembled = &disassembled_str[0];
1129
 
1130
/* Automagically does zero- or sign- extension and also finds correct
1131
   sign bit position if sign extension is correct extension. Which extension
1132
   is proper is figured out from letter description. */
1133
 
1134 879 markom
unsigned long
1135 371 markom
extend_imm(unsigned long imm, char l)
1136
{
1137
  unsigned long mask;
1138
  int letter_bits;
1139
 
1140
  /* First truncate all bits above valid range for this letter
1141
     in case it is zero extend. */
1142
  letter_bits = letter_range(l);
1143
  mask = (1 << letter_bits) - 1;
1144
  imm &= mask;
1145
 
1146
  /* Do sign extend if this is the right one. */
1147
  if (letter_signed(l) && (imm >> (letter_bits - 1)))
1148
    imm |= (~mask);
1149
 
1150
  return imm;
1151
}
1152
 
1153 879 markom
unsigned long
1154 371 markom
or32_extract(param_ch, enc_initial, insn)
1155
     char param_ch;
1156
     char *enc_initial;
1157
     unsigned long insn;
1158
{
1159
  char *enc;
1160
  unsigned long ret = 0;
1161
  int opc_pos = 0;
1162
  int param_pos = 0;
1163
 
1164
  for (enc = enc_initial; *enc != '\0'; enc++)
1165
    if (*enc == param_ch)
1166
      {
1167
        if (enc - 2 >= enc_initial && (*(enc - 2) == '0') && (*(enc - 1) == 'x'))
1168
          continue;
1169
        else
1170
          param_pos++;
1171
      }
1172
 
1173
#if DEBUG
1174
  printf("or32_extract: %x ", param_pos);
1175
#endif
1176
  opc_pos = 32;
1177
  for (enc = enc_initial; *enc != '\0'; )
1178
    if ((*enc == '0') && (*(enc+1) == 'x'))
1179
      {
1180
        opc_pos -= 4;
1181
        if ((param_ch == '0') || (param_ch == '1'))
1182
          {
1183
            unsigned long tmp = strtol(enc, NULL, 16);
1184
#if DEBUG
1185
            printf(" enc=%s, tmp=%x ", enc, tmp);
1186
#endif
1187
            if (param_ch == '0')
1188
              tmp = 15 - tmp;
1189
            ret |= tmp << opc_pos;
1190
          }
1191
        enc += 3;
1192
      }
1193
    else if ((*enc == '0') || (*enc == '1'))
1194
      {
1195
        opc_pos--;
1196
        if (param_ch == *enc)
1197
          ret |= 1 << opc_pos;
1198
        enc++;
1199
      }
1200
    else if (*enc == param_ch)
1201
      {
1202
        opc_pos--;
1203
        param_pos--;
1204
#if DEBUG
1205
        printf("\n  ret=%x opc_pos=%x, param_pos=%x\n", ret, opc_pos, param_pos);
1206
#endif  
1207
        if (islower(param_ch))
1208
          ret -= ((insn >> opc_pos) & 0x1) << param_pos;
1209
        else
1210
          ret += ((insn >> opc_pos) & 0x1) << param_pos;
1211
        enc++;
1212
      }
1213
    else if (isalpha(*enc))
1214
      {
1215
        opc_pos--;
1216
        enc++;
1217
      }
1218
    else if (*enc == '-')
1219
      {
1220
        opc_pos--;
1221
        enc++;
1222
      }
1223
    else
1224
      enc++;
1225
 
1226
#if DEBUG
1227
  printf ("ret=%x\n", ret);
1228
#endif
1229
  return ret;
1230
}
1231
 
1232
/* Print register. Used only by print_insn. */
1233
 
1234 703 markom
static char *
1235
or32_print_register (dest, param_ch, encoding, insn)
1236
     char *dest;
1237 371 markom
     char param_ch;
1238
     char *encoding;
1239
     unsigned long insn;
1240
{
1241
  int regnum = or32_extract(param_ch, encoding, insn);
1242
 
1243 703 markom
  sprintf (dest, "r%d", regnum);
1244
  while (*dest) dest++;
1245
  return dest;
1246 371 markom
}
1247
 
1248
/* Print immediate. Used only by print_insn. */
1249
 
1250 703 markom
static char *
1251
or32_print_immediate (dest, param_ch, encoding, insn)
1252
     char *dest;
1253 371 markom
     char param_ch;
1254
     char *encoding;
1255
     unsigned long insn;
1256
{
1257
  int imm = or32_extract (param_ch, encoding, insn);
1258
 
1259
  imm = extend_imm(imm, param_ch);
1260
 
1261
  if (letter_signed(param_ch))
1262
    {
1263
      if (imm < 0)
1264 703 markom
        sprintf (dest, "%d", imm);
1265 371 markom
      else
1266 703 markom
        sprintf (dest, "0x%x", imm);
1267 371 markom
    }
1268
  else
1269 703 markom
    sprintf (dest, "%#x", imm);
1270
  while (*dest) dest++;
1271
  return dest;
1272 371 markom
}
1273
 
1274
/* Disassemble one instruction from insn to disassemble.
1275
   Return the size of the instruction.  */
1276
 
1277
int
1278
disassemble_insn (insn)
1279
     unsigned long insn;
1280
{
1281 703 markom
  return disassemble_index (insn, insn_decode (insn));
1282
}
1283 371 markom
 
1284 703 markom
/* Disassemble one instruction from insn index.
1285
   Return the size of the instruction.  */
1286
 
1287
int
1288
disassemble_index (insn, index)
1289
     unsigned long insn;
1290
     int index;
1291
{
1292
  char *dest = disassembled;
1293 371 markom
  if (index >= 0)
1294
    {
1295
      struct or32_opcode const *opcode = &or32_opcodes[index];
1296
      char *s;
1297
 
1298 703 markom
      strcpy (dest, opcode->name);
1299
      while (*dest) dest++;
1300
      *dest++ = ' ';
1301
      *dest = 0;
1302
 
1303 371 markom
      for (s = opcode->args; *s != '\0'; ++s)
1304
        {
1305
          switch (*s)
1306
            {
1307
            case '\0':
1308 703 markom
              return insn_len (insn);
1309 714 markom
 
1310 371 markom
            case 'r':
1311 703 markom
              dest = or32_print_register(dest, *++s, opcode->encoding, insn);
1312 371 markom
              break;
1313 714 markom
 
1314 371 markom
            default:
1315
              if (strchr (opcode->encoding, *s))
1316 703 markom
                dest = or32_print_immediate (dest, *s, opcode->encoding, insn);
1317
              else {
1318
                *dest++ = *s;
1319
                *dest = 0;
1320
              }
1321 371 markom
            }
1322
        }
1323
    }
1324
  else
1325
    {
1326
      /* This used to be %8x for binutils.  */
1327 1308 phoenix
      sprintf(dest, ".word 0x%08lx", insn);
1328 703 markom
      while (*dest) dest++;
1329 371 markom
    }
1330
  return insn_len (insn);
1331
}

powered by: WebSVN 2.1.0

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