Coverage Report

Created: 2025-07-08 11:15

/src/binutils-gdb/opcodes/dlx-dis.c
Line
Count
Source (jump to first uncovered line)
1
/* Instruction printing code for the DLX Microprocessor
2
   Copyright (C) 2002-2025 Free Software Foundation, Inc.
3
   Contributed by Kuang Hwa Lin.  Written by Kuang Hwa Lin, 03/2002.
4
5
   This file is part of the GNU opcodes library.
6
7
   This library 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 3, or (at your option)
10
   any later version.
11
12
   It is distributed in the hope that it will be useful, but WITHOUT
13
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
15
   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., 51 Franklin Street - Fifth Floor, Boston,
20
   MA 02110-1301, USA.  */
21
22
#include "sysdep.h"
23
#include "disassemble.h"
24
#include "opcode/dlx.h"
25
26
50
#define R_ERROR     0x1
27
698
#define R_TYPE      0x2
28
1.44k
#define ILD_TYPE    0x3
29
1.62k
#define IST_TYPE    0x4
30
3.53k
#define IAL_TYPE    0x5
31
3.40k
#define IBR_TYPE    0x6
32
3.82k
#define IJ_TYPE     0x7
33
3.96k
#define IJR_TYPE    0x8
34
37.4k
#define NIL         0x9
35
36
151k
#define OPC(x)      ((x >> 26) & 0x3F)
37
#define FUNC(x)     (x & 0x7FF)
38
39
unsigned char opc, rs1, rs2, rd;
40
unsigned long imm26, imm16, func, current_insn_addr;
41
42
/* Print one instruction from MEMADDR on INFO->STREAM.
43
   Return the size of the instruction (always 4 on dlx).  */
44
45
static unsigned char
46
dlx_get_opcode (unsigned long opcode)
47
4.81k
{
48
4.81k
  return (unsigned char) ((opcode >> 26) & 0x3F);
49
4.81k
}
50
51
static unsigned char
52
dlx_get_rs1 (unsigned long opcode)
53
4.81k
{
54
4.81k
  return (unsigned char) ((opcode >> 21) & 0x1F);
55
4.81k
}
56
57
static unsigned char
58
dlx_get_rs2 (unsigned long opcode)
59
4.81k
{
60
4.81k
  return (unsigned char) ((opcode >> 16) & 0x1F);
61
4.81k
}
62
63
static unsigned char
64
dlx_get_rdR (unsigned long opcode)
65
4.81k
{
66
4.81k
  return (unsigned char) ((opcode >> 11) & 0x1F);
67
4.81k
}
68
69
static unsigned long
70
dlx_get_func (unsigned long opcode)
71
4.81k
{
72
4.81k
  return (unsigned char) (opcode & 0x7FF);
73
4.81k
}
74
75
static unsigned long
76
dlx_get_imm16 (unsigned long opcode)
77
4.81k
{
78
4.81k
  return (unsigned long) (opcode & 0xFFFF);
79
4.81k
}
80
81
static unsigned long
82
dlx_get_imm26 (unsigned long opcode)
83
4.81k
{
84
4.81k
  return (unsigned long) (opcode & 0x03FFFFFF);
85
4.81k
}
86
87
/* Fill the opcode to the max length.  */
88
89
static void
90
operand_deliminator (struct disassemble_info *info, char *ptr)
91
3.49k
{
92
3.49k
  int difft = 8 - (int) strlen (ptr);
93
94
19.2k
  while (difft > 0)
95
15.7k
    {
96
15.7k
      (*info->fprintf_func) (info->stream, "%c", ' ');
97
15.7k
      difft -= 1;
98
15.7k
    }
99
3.49k
}
100
101
/* Process the R-type opcode.  */
102
103
static unsigned char
104
dlx_r_type (struct disassemble_info *info)
105
4.81k
{
106
4.81k
  unsigned char r_opc[] = { OPC(ALUOP) }; /* Fix ME */
107
4.81k
  int r_opc_num = (sizeof r_opc) / (sizeof (char));
108
4.81k
  struct _r_opcode
109
4.81k
  {
110
4.81k
    unsigned long func;
111
4.81k
    char *name;
112
4.81k
  }
113
4.81k
  dlx_r_opcode[] =
114
4.81k
  {
115
4.81k
    { NOPF,     "nop"    },  /* NOP                          */
116
4.81k
    { ADDF,     "add"    },  /* Add                          */
117
4.81k
    { ADDUF,    "addu"   },  /* Add Unsigned                 */
118
4.81k
    { SUBF,     "sub"    },  /* SUB                          */
119
4.81k
    { SUBUF,    "subu"   },  /* Sub Unsigned                 */
120
4.81k
    { MULTF,    "mult"   },  /* MULTIPLY                     */
121
4.81k
    { MULTUF,   "multu"  },  /* MULTIPLY Unsigned            */
122
4.81k
    { DIVF,     "div"    },  /* DIVIDE                       */
123
4.81k
    { DIVUF,    "divu"   },  /* DIVIDE Unsigned              */
124
4.81k
    { ANDF,     "and"    },  /* AND                          */
125
4.81k
    { ORF,      "or"     },  /* OR                           */
126
4.81k
    { XORF,     "xor"    },  /* Exclusive OR                 */
127
4.81k
    { SLLF,     "sll"    },  /* SHIFT LEFT LOGICAL           */
128
4.81k
    { SRAF,     "sra"    },  /* SHIFT RIGHT ARITHMETIC       */
129
4.81k
    { SRLF,     "srl"    },  /* SHIFT RIGHT LOGICAL          */
130
4.81k
    { SEQF,     "seq"    },  /* Set if equal                 */
131
4.81k
    { SNEF,     "sne"    },  /* Set if not equal             */
132
4.81k
    { SLTF,     "slt"    },  /* Set if less                  */
133
4.81k
    { SGTF,     "sgt"    },  /* Set if greater               */
134
4.81k
    { SLEF,     "sle"    },  /* Set if less or equal         */
135
4.81k
    { SGEF,     "sge"    },  /* Set if greater or equal      */
136
4.81k
    { SEQUF,    "sequ"   },  /* Set if equal                 */
137
4.81k
    { SNEUF,    "sneu"   },  /* Set if not equal             */
138
4.81k
    { SLTUF,    "sltu"   },  /* Set if less                  */
139
4.81k
    { SGTUF,    "sgtu"   },  /* Set if greater               */
140
4.81k
    { SLEUF,    "sleu"   },  /* Set if less or equal         */
141
4.81k
    { SGEUF,    "sgeu"   },  /* Set if greater or equal      */
142
4.81k
    { MVTSF,    "mvts"   },  /* Move to special register     */
143
4.81k
    { MVFSF,    "mvfs"   },  /* Move from special register   */
144
4.81k
    { BSWAPF,   "bswap"  },  /* Byte swap ??                 */
145
4.81k
    { LUTF,     "lut"    }   /* ????????? ??                 */
146
4.81k
  };
147
4.81k
  int dlx_r_opcode_num = (sizeof dlx_r_opcode) / (sizeof dlx_r_opcode[0]);
148
4.81k
  int idx;
149
150
9.26k
  for (idx = 0; idx < r_opc_num; idx++)
151
4.81k
    {
152
4.81k
      if (r_opc[idx] != opc)
153
4.44k
  continue;
154
374
      else
155
374
  break;
156
4.81k
    }
157
158
4.81k
  if (idx == r_opc_num)
159
4.44k
    return NIL;
160
161
3.77k
  for (idx = 0 ; idx < dlx_r_opcode_num; idx++)
162
3.74k
    if (dlx_r_opcode[idx].func == func)
163
349
      {
164
349
  (*info->fprintf_func) (info->stream, "%s", dlx_r_opcode[idx].name);
165
166
349
  if (func != NOPF)
167
183
    {
168
      /* This is not a nop.  */
169
183
      operand_deliminator (info, dlx_r_opcode[idx].name);
170
183
      (*info->fprintf_func) (info->stream, "r%d,", (int)rd);
171
183
      (*info->fprintf_func) (info->stream, "r%d", (int)rs1);
172
183
      if (func != MVTSF && func != MVFSF)
173
181
        (*info->fprintf_func) (info->stream, ",r%d", (int)rs2);
174
183
    }
175
349
  return (unsigned char) R_TYPE;
176
349
      }
177
178
25
  return (unsigned char) R_ERROR;
179
374
}
180
181
/* Process the memory read opcode.  */
182
183
static unsigned char
184
dlx_load_type (struct disassemble_info* info)
185
4.44k
{
186
4.44k
  struct _load_opcode
187
4.44k
  {
188
4.44k
    unsigned long opcode;
189
4.44k
    char *name;
190
4.44k
  }
191
4.44k
  dlx_load_opcode[] =
192
4.44k
  {
193
4.44k
    { OPC(LHIOP),   "lhi" },  /* Load HI to register.           */
194
4.44k
    { OPC(LBOP),     "lb" },  /* load byte sign extended.       */
195
4.44k
    { OPC(LBUOP),   "lbu" },  /* load byte unsigned.            */
196
4.44k
    { OPC(LSBUOP),"ldstbu"},  /* load store byte unsigned.      */
197
4.44k
    { OPC(LHOP),     "lh" },  /* load halfword sign extended.   */
198
4.44k
    { OPC(LHUOP),   "lhu" },  /* load halfword unsigned.        */
199
4.44k
    { OPC(LSHUOP),"ldsthu"},  /* load store halfword unsigned.  */
200
4.44k
    { OPC(LWOP),     "lw" },  /* load word.                     */
201
4.44k
    { OPC(LSWOP), "ldstw" }   /* load store word.               */
202
4.44k
  };
203
4.44k
  int dlx_load_opcode_num =
204
4.44k
    (sizeof dlx_load_opcode) / (sizeof dlx_load_opcode[0]);
205
4.44k
  int idx;
206
207
41.4k
  for (idx = 0 ; idx < dlx_load_opcode_num; idx++)
208
37.5k
    if (dlx_load_opcode[idx].opcode == opc)
209
550
      {
210
550
  if (opc == OPC (LHIOP))
211
44
    {
212
44
      (*info->fprintf_func) (info->stream, "%s", dlx_load_opcode[idx].name);
213
44
      operand_deliminator (info, dlx_load_opcode[idx].name);
214
44
      (*info->fprintf_func) (info->stream, "r%d,", (int)rs2);
215
44
      (*info->fprintf_func) (info->stream, "0x%04x", (int)imm16);
216
44
    }
217
506
  else
218
506
    {
219
506
      (*info->fprintf_func) (info->stream, "%s", dlx_load_opcode[idx].name);
220
506
      operand_deliminator (info, dlx_load_opcode[idx].name);
221
506
      (*info->fprintf_func) (info->stream, "r%d,", (int)rs2);
222
506
      (*info->fprintf_func) (info->stream, "0x%04x[r%d]", (int)imm16, (int)rs1);
223
506
    }
224
225
550
  return (unsigned char) ILD_TYPE;
226
550
    }
227
228
3.89k
  return (unsigned char) NIL;
229
4.44k
}
230
231
/* Process the memory store opcode.  */
232
233
static unsigned char
234
dlx_store_type (struct disassemble_info* info)
235
3.89k
{
236
3.89k
  struct _store_opcode
237
3.89k
  {
238
3.89k
    unsigned long opcode;
239
3.89k
    char *name;
240
3.89k
  }
241
3.89k
  dlx_store_opcode[] =
242
3.89k
  {
243
3.89k
    { OPC(SBOP),     "sb" },  /* Store byte.      */
244
3.89k
    { OPC(SHOP),     "sh" },  /* Store halfword.  */
245
3.89k
    { OPC(SWOP),     "sw" },  /* Store word.      */
246
3.89k
  };
247
3.89k
  int dlx_store_opcode_num =
248
3.89k
    (sizeof dlx_store_opcode) / (sizeof dlx_store_opcode[0]);
249
3.89k
  int idx;
250
251
15.0k
  for (idx = 0 ; idx < dlx_store_opcode_num; idx++)
252
11.4k
    if (dlx_store_opcode[idx].opcode == opc)
253
364
      {
254
364
  (*info->fprintf_func) (info->stream, "%s", dlx_store_opcode[idx].name);
255
364
  operand_deliminator (info, dlx_store_opcode[idx].name);
256
364
  (*info->fprintf_func) (info->stream, "0x%04x[r%d],", (int)imm16, (int)rs1);
257
364
  (*info->fprintf_func) (info->stream, "r%d", (int)rs2);
258
364
  return (unsigned char) IST_TYPE;
259
364
      }
260
261
3.53k
  return (unsigned char) NIL;
262
3.89k
}
263
264
/* Process the Arithmetic and Logical I-TYPE opcode.  */
265
266
static unsigned char
267
dlx_aluI_type (struct disassemble_info* info)
268
3.53k
{
269
3.53k
  struct _aluI_opcode
270
3.53k
  {
271
3.53k
    unsigned long opcode;
272
3.53k
    char *name;
273
3.53k
  }
274
3.53k
  dlx_aluI_opcode[] =
275
3.53k
  {
276
3.53k
    { OPC(ADDIOP),   "addi"  },  /* Store byte.      */
277
3.53k
    { OPC(ADDUIOP),  "addui" },  /* Store halfword.  */
278
3.53k
    { OPC(SUBIOP),   "subi"  },  /* Store word.      */
279
3.53k
    { OPC(SUBUIOP),  "subui" },  /* Store word.      */
280
3.53k
    { OPC(ANDIOP),   "andi"  },  /* Store word.      */
281
3.53k
    { OPC(ORIOP),    "ori"   },  /* Store word.      */
282
3.53k
    { OPC(XORIOP),   "xori"  },  /* Store word.      */
283
3.53k
    { OPC(SLLIOP),   "slli"  },  /* Store word.      */
284
3.53k
    { OPC(SRAIOP),   "srai"  },  /* Store word.      */
285
3.53k
    { OPC(SRLIOP),   "srli"  },  /* Store word.      */
286
3.53k
    { OPC(SEQIOP),   "seqi"  },  /* Store word.      */
287
3.53k
    { OPC(SNEIOP),   "snei"  },  /* Store word.      */
288
3.53k
    { OPC(SLTIOP),   "slti"  },  /* Store word.      */
289
3.53k
    { OPC(SGTIOP),   "sgti"  },  /* Store word.      */
290
3.53k
    { OPC(SLEIOP),   "slei"  },  /* Store word.      */
291
3.53k
    { OPC(SGEIOP),   "sgei"  },  /* Store word.      */
292
3.53k
    { OPC(SEQUIOP),  "sequi" },  /* Store word.      */
293
3.53k
    { OPC(SNEUIOP),  "sneui" },  /* Store word.      */
294
3.53k
    { OPC(SLTUIOP),  "sltui" },  /* Store word.      */
295
3.53k
    { OPC(SGTUIOP),  "sgtui" },  /* Store word.      */
296
3.53k
    { OPC(SLEUIOP),  "sleui" },  /* Store word.      */
297
3.53k
    { OPC(SGEUIOP),  "sgeui" },  /* Store word.      */
298
#if 0
299
    { OPC(MVTSOP),   "mvts"  },  /* Store word.      */
300
    { OPC(MVFSOP),   "mvfs"  },  /* Store word.      */
301
#endif
302
3.53k
  };
303
3.53k
  int dlx_aluI_opcode_num =
304
3.53k
    (sizeof dlx_aluI_opcode) / (sizeof dlx_aluI_opcode[0]);
305
3.53k
  int idx;
306
307
66.4k
  for (idx = 0 ; idx < dlx_aluI_opcode_num; idx++)
308
64.1k
    if (dlx_aluI_opcode[idx].opcode == opc)
309
1.13k
      {
310
1.13k
  (*info->fprintf_func) (info->stream, "%s", dlx_aluI_opcode[idx].name);
311
1.13k
  operand_deliminator (info, dlx_aluI_opcode[idx].name);
312
1.13k
  (*info->fprintf_func) (info->stream, "r%d,", (int)rs2);
313
1.13k
  (*info->fprintf_func) (info->stream, "r%d,", (int)rs1);
314
1.13k
  (*info->fprintf_func) (info->stream, "0x%04x", (int)imm16);
315
316
1.13k
  return (unsigned char) IAL_TYPE;
317
1.13k
      }
318
319
2.39k
  return (unsigned char) NIL;
320
3.53k
}
321
322
/* Process the branch instruction.  */
323
324
static unsigned char
325
dlx_br_type (struct disassemble_info* info)
326
2.39k
{
327
2.39k
  struct _br_opcode
328
2.39k
  {
329
2.39k
    unsigned long opcode;
330
2.39k
    char *name;
331
2.39k
  }
332
2.39k
  dlx_br_opcode[] =
333
2.39k
  {
334
2.39k
    { OPC(BEQOP), "beqz" }, /* Store byte.  */
335
2.39k
    { OPC(BNEOP), "bnez" }  /* Store halfword.  */
336
2.39k
  };
337
2.39k
  int dlx_br_opcode_num =
338
2.39k
    (sizeof dlx_br_opcode) / (sizeof dlx_br_opcode[0]);
339
2.39k
  int idx;
340
341
6.50k
  for (idx = 0 ; idx < dlx_br_opcode_num; idx++)
342
4.61k
    if (dlx_br_opcode[idx].opcode == opc)
343
503
      {
344
503
  if (imm16 & 0x00008000)
345
29
    imm16 |= 0xFFFF0000;
346
347
503
  imm16 += (current_insn_addr + 4);
348
503
  (*info->fprintf_func) (info->stream, "%s", dlx_br_opcode[idx].name);
349
503
  operand_deliminator (info, dlx_br_opcode[idx].name);
350
503
  (*info->fprintf_func) (info->stream, "r%d,", (int) rs1);
351
503
  (*info->fprintf_func) (info->stream, "0x%08x", (int) imm16);
352
353
503
  return (unsigned char) IBR_TYPE;
354
503
      }
355
356
1.89k
  return (unsigned char) NIL;
357
2.39k
}
358
359
/* Process the jump instruction.  */
360
361
static unsigned char
362
dlx_jmp_type (struct disassemble_info* info)
363
1.89k
{
364
1.89k
  struct _jmp_opcode
365
1.89k
  {
366
1.89k
    unsigned long opcode;
367
1.89k
    char *name;
368
1.89k
  }
369
1.89k
  dlx_jmp_opcode[] =
370
1.89k
  {
371
1.89k
    { OPC(JOP),         "j" },  /* Store byte.      */
372
1.89k
    { OPC(JALOP),     "jal" },  /* Store halfword.  */
373
1.89k
    { OPC(BREAKOP), "break" },  /* Store halfword.  */
374
1.89k
    { OPC(TRAPOP),   "trap" },  /* Store halfword.  */
375
1.89k
    { OPC(RFEOP),     "rfe" }   /* Store halfword.  */
376
1.89k
  };
377
1.89k
  int dlx_jmp_opcode_num =
378
1.89k
    (sizeof dlx_jmp_opcode) / (sizeof dlx_jmp_opcode[0]);
379
1.89k
  int idx;
380
381
9.80k
  for (idx = 0 ; idx < dlx_jmp_opcode_num; idx++)
382
8.37k
    if (dlx_jmp_opcode[idx].opcode == opc)
383
459
      {
384
459
  if (imm26 & 0x02000000)
385
134
    imm26 |= 0xFC000000;
386
387
459
  imm26 += (current_insn_addr + 4);
388
389
459
  (*info->fprintf_func) (info->stream, "%s", dlx_jmp_opcode[idx].name);
390
459
  operand_deliminator (info, dlx_jmp_opcode[idx].name);
391
459
  (*info->fprintf_func) (info->stream, "0x%08x", (int)imm26);
392
393
459
  return (unsigned char) IJ_TYPE;
394
459
      }
395
396
1.43k
  return (unsigned char) NIL;
397
1.89k
}
398
399
/* Process the jump register instruction.  */
400
401
static unsigned char
402
dlx_jr_type (struct disassemble_info* info)
403
1.43k
{
404
1.43k
  struct _jr_opcode
405
1.43k
  {
406
1.43k
    unsigned long opcode;
407
1.43k
    char *name;
408
1.43k
  }
409
1.43k
  dlx_jr_opcode[] =
410
1.43k
  {
411
1.43k
    { OPC(JROP),   "jr"    },  /* Store byte.  */
412
1.43k
    { OPC(JALROP), "jalr"  }   /* Store halfword.  */
413
1.43k
  };
414
1.43k
  int dlx_jr_opcode_num =
415
1.43k
    (sizeof dlx_jr_opcode) / (sizeof dlx_jr_opcode[0]);
416
1.43k
  int idx;
417
418
3.86k
  for (idx = 0 ; idx < dlx_jr_opcode_num; idx++)
419
2.73k
    if (dlx_jr_opcode[idx].opcode == opc)
420
304
      {
421
304
  (*info->fprintf_func) (info->stream, "%s", dlx_jr_opcode[idx].name);
422
304
  operand_deliminator (info, dlx_jr_opcode[idx].name);
423
304
  (*info->fprintf_func) (info->stream, "r%d", (int)rs1);
424
304
  return (unsigned char) IJR_TYPE;
425
304
      }
426
427
1.12k
  return (unsigned char) NIL;
428
1.43k
}
429
430
typedef unsigned char (* dlx_insn) (struct disassemble_info *);
431
432
/* This is the main DLX insn handling routine.  */
433
434
int
435
print_insn_dlx (bfd_vma memaddr, struct disassemble_info* info)
436
4.86k
{
437
4.86k
  bfd_byte buffer[4];
438
4.86k
  int insn_idx;
439
4.86k
  unsigned long insn_word;
440
4.86k
  dlx_insn dlx_insn_type[] =
441
4.86k
  {
442
4.86k
    dlx_r_type,
443
4.86k
    dlx_load_type,
444
4.86k
    dlx_store_type,
445
4.86k
    dlx_aluI_type,
446
4.86k
    dlx_br_type,
447
4.86k
    dlx_jmp_type,
448
4.86k
    dlx_jr_type,
449
4.86k
    (dlx_insn) NULL
450
4.86k
  };
451
4.86k
  int dlx_insn_type_num = ((sizeof dlx_insn_type) / (sizeof (dlx_insn))) - 1;
452
4.86k
  int status =
453
4.86k
    (*info->read_memory_func) (memaddr, (bfd_byte *) &buffer[0], 4, info);
454
455
4.86k
  if (status != 0)
456
47
    {
457
47
      (*info->memory_error_func) (status, memaddr, info);
458
47
      return -1;
459
47
    }
460
461
  /* Now decode the insn    */
462
4.81k
  insn_word = bfd_getb32 (buffer);
463
4.81k
  opc  = dlx_get_opcode (insn_word);
464
4.81k
  rs1  = dlx_get_rs1 (insn_word);
465
4.81k
  rs2  = dlx_get_rs2 (insn_word);
466
4.81k
  rd   = dlx_get_rdR (insn_word);
467
4.81k
  func = dlx_get_func (insn_word);
468
4.81k
  imm16= dlx_get_imm16 (insn_word);
469
4.81k
  imm26= dlx_get_imm26 (insn_word);
470
471
#if 0
472
  printf ("print_insn_big_dlx: opc = 0x%02x\n"
473
    "                    rs1 = 0x%02x\n"
474
    "                    rs2 = 0x%02x\n"
475
    "                    rd  = 0x%02x\n"
476
    "                  func  = 0x%08x\n"
477
    "                 imm16  = 0x%08x\n"
478
    "                 imm26  = 0x%08x\n",
479
    opc, rs1, rs2, rd, func, imm16, imm26);
480
#endif
481
482
  /* Scan through all the insn type and print the insn out.  */
483
4.81k
  current_insn_addr = (unsigned long) memaddr;
484
485
23.5k
  for (insn_idx = 0; dlx_insn_type[insn_idx] != 0x0; insn_idx++)
486
22.4k
    switch ((dlx_insn_type[insn_idx]) (info))
487
22.4k
      {
488
  /* Found the correct opcode   */
489
349
      case R_TYPE:
490
899
      case ILD_TYPE:
491
1.26k
      case IST_TYPE:
492
2.39k
      case IAL_TYPE:
493
2.90k
      case IBR_TYPE:
494
3.36k
      case IJ_TYPE:
495
3.66k
      case IJR_TYPE:
496
3.66k
  return 4;
497
498
  /* Wrong insn type check next one. */
499
0
      default:
500
18.7k
      case NIL:
501
18.7k
  continue;
502
503
  /* All rest of the return code are not recongnized, treat it as error */
504
  /* we should never get here,  I hope! */
505
25
      case R_ERROR:
506
25
  return -1;
507
22.4k
      }
508
509
1.12k
  if (insn_idx ==  dlx_insn_type_num)
510
    /* Well, does not recoganize this opcode.  */
511
1.12k
    (*info->fprintf_func) (info->stream, "<%s>", "Unrecognized Opcode");
512
513
1.12k
  return 4;
514
4.81k
}