Coverage Report

Created: 2026-11-21 09:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/binutils-gdb/opcodes/dlx-dis.c
Line
Count
Source
1
/* Instruction printing code for the DLX Microprocessor
2
   Copyright (C) 2002-2026 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
68
#define R_ERROR     0x1
27
2.35k
#define R_TYPE      0x2
28
3.17k
#define ILD_TYPE    0x3
29
3.13k
#define IST_TYPE    0x4
30
6.55k
#define IAL_TYPE    0x5
31
6.38k
#define IBR_TYPE    0x6
32
6.38k
#define IJ_TYPE     0x7
33
6.59k
#define IJR_TYPE    0x8
34
58.2k
#define NIL         0x9
35
36
237k
#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
8.24k
{
48
8.24k
  return (unsigned char) ((opcode >> 26) & 0x3F);
49
8.24k
}
50
51
static unsigned char
52
dlx_get_rs1 (unsigned long opcode)
53
8.24k
{
54
8.24k
  return (unsigned char) ((opcode >> 21) & 0x1F);
55
8.24k
}
56
57
static unsigned char
58
dlx_get_rs2 (unsigned long opcode)
59
8.24k
{
60
8.24k
  return (unsigned char) ((opcode >> 16) & 0x1F);
61
8.24k
}
62
63
static unsigned char
64
dlx_get_rdR (unsigned long opcode)
65
8.24k
{
66
8.24k
  return (unsigned char) ((opcode >> 11) & 0x1F);
67
8.24k
}
68
69
static unsigned long
70
dlx_get_func (unsigned long opcode)
71
8.24k
{
72
8.24k
  return (unsigned char) (opcode & 0x7FF);
73
8.24k
}
74
75
static unsigned long
76
dlx_get_imm16 (unsigned long opcode)
77
8.24k
{
78
8.24k
  return (unsigned long) (opcode & 0xFFFF);
79
8.24k
}
80
81
static unsigned long
82
dlx_get_imm26 (unsigned long opcode)
83
8.24k
{
84
8.24k
  return (unsigned long) (opcode & 0x03FFFFFF);
85
8.24k
}
86
87
/* Fill the opcode to the max length.  */
88
89
static void
90
operand_deliminator (struct disassemble_info *info, char *ptr)
91
5.51k
{
92
5.51k
  int difft = 8 - (int) strlen (ptr);
93
94
29.4k
  while (difft > 0)
95
23.9k
    {
96
23.9k
      (*info->fprintf_func) (info->stream, "%c", ' ');
97
23.9k
      difft -= 1;
98
23.9k
    }
99
5.51k
}
100
101
/* Process the R-type opcode.  */
102
103
static unsigned char
104
dlx_r_type (struct disassemble_info *info)
105
8.24k
{
106
8.24k
  unsigned char r_opc[] = { OPC(ALUOP) }; /* Fix ME */
107
8.24k
  int r_opc_num = (sizeof r_opc) / (sizeof (char));
108
8.24k
  struct _r_opcode
109
8.24k
  {
110
8.24k
    unsigned long func;
111
8.24k
    char *name;
112
8.24k
  }
113
8.24k
  dlx_r_opcode[] =
114
8.24k
  {
115
8.24k
    { NOPF,     "nop"    },  /* NOP                          */
116
8.24k
    { ADDF,     "add"    },  /* Add                          */
117
8.24k
    { ADDUF,    "addu"   },  /* Add Unsigned                 */
118
8.24k
    { SUBF,     "sub"    },  /* SUB                          */
119
8.24k
    { SUBUF,    "subu"   },  /* Sub Unsigned                 */
120
8.24k
    { MULTF,    "mult"   },  /* MULTIPLY                     */
121
8.24k
    { MULTUF,   "multu"  },  /* MULTIPLY Unsigned            */
122
8.24k
    { DIVF,     "div"    },  /* DIVIDE                       */
123
8.24k
    { DIVUF,    "divu"   },  /* DIVIDE Unsigned              */
124
8.24k
    { ANDF,     "and"    },  /* AND                          */
125
8.24k
    { ORF,      "or"     },  /* OR                           */
126
8.24k
    { XORF,     "xor"    },  /* Exclusive OR                 */
127
8.24k
    { SLLF,     "sll"    },  /* SHIFT LEFT LOGICAL           */
128
8.24k
    { SRAF,     "sra"    },  /* SHIFT RIGHT ARITHMETIC       */
129
8.24k
    { SRLF,     "srl"    },  /* SHIFT RIGHT LOGICAL          */
130
8.24k
    { SEQF,     "seq"    },  /* Set if equal                 */
131
8.24k
    { SNEF,     "sne"    },  /* Set if not equal             */
132
8.24k
    { SLTF,     "slt"    },  /* Set if less                  */
133
8.24k
    { SGTF,     "sgt"    },  /* Set if greater               */
134
8.24k
    { SLEF,     "sle"    },  /* Set if less or equal         */
135
8.24k
    { SGEF,     "sge"    },  /* Set if greater or equal      */
136
8.24k
    { SEQUF,    "sequ"   },  /* Set if equal                 */
137
8.24k
    { SNEUF,    "sneu"   },  /* Set if not equal             */
138
8.24k
    { SLTUF,    "sltu"   },  /* Set if less                  */
139
8.24k
    { SGTUF,    "sgtu"   },  /* Set if greater               */
140
8.24k
    { SLEUF,    "sleu"   },  /* Set if less or equal         */
141
8.24k
    { SGEUF,    "sgeu"   },  /* Set if greater or equal      */
142
8.24k
    { MVTSF,    "mvts"   },  /* Move to special register     */
143
8.24k
    { MVFSF,    "mvfs"   },  /* Move from special register   */
144
8.24k
    { BSWAPF,   "bswap"  },  /* Byte swap ??                 */
145
8.24k
    { LUTF,     "lut"    }   /* ????????? ??                 */
146
8.24k
  };
147
8.24k
  int dlx_r_opcode_num = (sizeof dlx_r_opcode) / (sizeof dlx_r_opcode[0]);
148
8.24k
  int idx;
149
150
15.2k
  for (idx = 0; idx < r_opc_num; idx++)
151
8.24k
    {
152
8.24k
      if (r_opc[idx] != opc)
153
7.03k
  continue;
154
1.20k
      else
155
1.20k
  break;
156
8.24k
    }
157
158
8.24k
  if (idx == r_opc_num)
159
7.03k
    return NIL;
160
161
8.02k
  for (idx = 0 ; idx < dlx_r_opcode_num; idx++)
162
7.98k
    if (dlx_r_opcode[idx].func == func)
163
1.17k
      {
164
1.17k
  (*info->fprintf_func) (info->stream, "%s", dlx_r_opcode[idx].name);
165
166
1.17k
  if (func != NOPF)
167
422
    {
168
      /* This is not a nop.  */
169
422
      operand_deliminator (info, dlx_r_opcode[idx].name);
170
422
      (*info->fprintf_func) (info->stream, "r%d,", (int)rd);
171
422
      (*info->fprintf_func) (info->stream, "r%d", (int)rs1);
172
422
      if (func != MVTSF && func != MVFSF)
173
319
        (*info->fprintf_func) (info->stream, ",r%d", (int)rs2);
174
422
    }
175
1.17k
  return (unsigned char) R_TYPE;
176
1.17k
      }
177
178
34
  return (unsigned char) R_ERROR;
179
1.20k
}
180
181
/* Process the memory read opcode.  */
182
183
static unsigned char
184
dlx_load_type (struct disassemble_info* info)
185
7.03k
{
186
7.03k
  struct _load_opcode
187
7.03k
  {
188
7.03k
    unsigned long opcode;
189
7.03k
    char *name;
190
7.03k
  }
191
7.03k
  dlx_load_opcode[] =
192
7.03k
  {
193
7.03k
    { OPC(LHIOP),   "lhi" },  /* Load HI to register.           */
194
7.03k
    { OPC(LBOP),     "lb" },  /* load byte sign extended.       */
195
7.03k
    { OPC(LBUOP),   "lbu" },  /* load byte unsigned.            */
196
7.03k
    { OPC(LSBUOP),"ldstbu"},  /* load store byte unsigned.      */
197
7.03k
    { OPC(LHOP),     "lh" },  /* load halfword sign extended.   */
198
7.03k
    { OPC(LHUOP),   "lhu" },  /* load halfword unsigned.        */
199
7.03k
    { OPC(LSHUOP),"ldsthu"},  /* load store halfword unsigned.  */
200
7.03k
    { OPC(LWOP),     "lw" },  /* load word.                     */
201
7.03k
    { OPC(LSWOP), "ldstw" }   /* load store word.               */
202
7.03k
  };
203
7.03k
  int dlx_load_opcode_num =
204
7.03k
    (sizeof dlx_load_opcode) / (sizeof dlx_load_opcode[0]);
205
7.03k
  int idx;
206
207
63.8k
  for (idx = 0 ; idx < dlx_load_opcode_num; idx++)
208
57.8k
    if (dlx_load_opcode[idx].opcode == opc)
209
1.00k
      {
210
1.00k
  if (opc == OPC (LHIOP))
211
450
    {
212
450
      (*info->fprintf_func) (info->stream, "%s", dlx_load_opcode[idx].name);
213
450
      operand_deliminator (info, dlx_load_opcode[idx].name);
214
450
      (*info->fprintf_func) (info->stream, "r%d,", (int)rs2);
215
450
      (*info->fprintf_func) (info->stream, "0x%04x", (int)imm16);
216
450
    }
217
552
  else
218
552
    {
219
552
      (*info->fprintf_func) (info->stream, "%s", dlx_load_opcode[idx].name);
220
552
      operand_deliminator (info, dlx_load_opcode[idx].name);
221
552
      (*info->fprintf_func) (info->stream, "r%d,", (int)rs2);
222
552
      (*info->fprintf_func) (info->stream, "0x%04x[r%d]", (int)imm16, (int)rs1);
223
552
    }
224
225
1.00k
  return (unsigned char) ILD_TYPE;
226
1.00k
    }
227
228
6.02k
  return (unsigned char) NIL;
229
7.03k
}
230
231
/* Process the memory store opcode.  */
232
233
static unsigned char
234
dlx_store_type (struct disassemble_info* info)
235
6.02k
{
236
6.02k
  struct _store_opcode
237
6.02k
  {
238
6.02k
    unsigned long opcode;
239
6.02k
    char *name;
240
6.02k
  }
241
6.02k
  dlx_store_opcode[] =
242
6.02k
  {
243
6.02k
    { OPC(SBOP),     "sb" },  /* Store byte.      */
244
6.02k
    { OPC(SHOP),     "sh" },  /* Store halfword.  */
245
6.02k
    { OPC(SWOP),     "sw" },  /* Store word.      */
246
6.02k
  };
247
6.02k
  int dlx_store_opcode_num =
248
6.02k
    (sizeof dlx_store_opcode) / (sizeof dlx_store_opcode[0]);
249
6.02k
  int idx;
250
251
22.7k
  for (idx = 0 ; idx < dlx_store_opcode_num; idx++)
252
17.2k
    if (dlx_store_opcode[idx].opcode == opc)
253
480
      {
254
480
  (*info->fprintf_func) (info->stream, "%s", dlx_store_opcode[idx].name);
255
480
  operand_deliminator (info, dlx_store_opcode[idx].name);
256
480
  (*info->fprintf_func) (info->stream, "0x%04x[r%d],", (int)imm16, (int)rs1);
257
480
  (*info->fprintf_func) (info->stream, "r%d", (int)rs2);
258
480
  return (unsigned char) IST_TYPE;
259
480
      }
260
261
5.54k
  return (unsigned char) NIL;
262
6.02k
}
263
264
/* Process the Arithmetic and Logical I-TYPE opcode.  */
265
266
static unsigned char
267
dlx_aluI_type (struct disassemble_info* info)
268
5.54k
{
269
5.54k
  struct _aluI_opcode
270
5.54k
  {
271
5.54k
    unsigned long opcode;
272
5.54k
    char *name;
273
5.54k
  }
274
5.54k
  dlx_aluI_opcode[] =
275
5.54k
  {
276
5.54k
    { OPC(ADDIOP),   "addi"  },  /* Store byte.      */
277
5.54k
    { OPC(ADDUIOP),  "addui" },  /* Store halfword.  */
278
5.54k
    { OPC(SUBIOP),   "subi"  },  /* Store word.      */
279
5.54k
    { OPC(SUBUIOP),  "subui" },  /* Store word.      */
280
5.54k
    { OPC(ANDIOP),   "andi"  },  /* Store word.      */
281
5.54k
    { OPC(ORIOP),    "ori"   },  /* Store word.      */
282
5.54k
    { OPC(XORIOP),   "xori"  },  /* Store word.      */
283
5.54k
    { OPC(SLLIOP),   "slli"  },  /* Store word.      */
284
5.54k
    { OPC(SRAIOP),   "srai"  },  /* Store word.      */
285
5.54k
    { OPC(SRLIOP),   "srli"  },  /* Store word.      */
286
5.54k
    { OPC(SEQIOP),   "seqi"  },  /* Store word.      */
287
5.54k
    { OPC(SNEIOP),   "snei"  },  /* Store word.      */
288
5.54k
    { OPC(SLTIOP),   "slti"  },  /* Store word.      */
289
5.54k
    { OPC(SGTIOP),   "sgti"  },  /* Store word.      */
290
5.54k
    { OPC(SLEIOP),   "slei"  },  /* Store word.      */
291
5.54k
    { OPC(SGEIOP),   "sgei"  },  /* Store word.      */
292
5.54k
    { OPC(SEQUIOP),  "sequi" },  /* Store word.      */
293
5.54k
    { OPC(SNEUIOP),  "sneui" },  /* Store word.      */
294
5.54k
    { OPC(SLTUIOP),  "sltui" },  /* Store word.      */
295
5.54k
    { OPC(SGTUIOP),  "sgtui" },  /* Store word.      */
296
5.54k
    { OPC(SLEUIOP),  "sleui" },  /* Store word.      */
297
5.54k
    { OPC(SGEUIOP),  "sgeui" },  /* Store word.      */
298
#if 0
299
    { OPC(MVTSOP),   "mvts"  },  /* Store word.      */
300
    { OPC(MVFSOP),   "mvfs"  },  /* Store word.      */
301
#endif
302
5.54k
  };
303
5.54k
  int dlx_aluI_opcode_num =
304
5.54k
    (sizeof dlx_aluI_opcode) / (sizeof dlx_aluI_opcode[0]);
305
5.54k
  int idx;
306
307
104k
  for (idx = 0 ; idx < dlx_aluI_opcode_num; idx++)
308
100k
    if (dlx_aluI_opcode[idx].opcode == opc)
309
1.95k
      {
310
1.95k
  (*info->fprintf_func) (info->stream, "%s", dlx_aluI_opcode[idx].name);
311
1.95k
  operand_deliminator (info, dlx_aluI_opcode[idx].name);
312
1.95k
  (*info->fprintf_func) (info->stream, "r%d,", (int)rs2);
313
1.95k
  (*info->fprintf_func) (info->stream, "r%d,", (int)rs1);
314
1.95k
  (*info->fprintf_func) (info->stream, "0x%04x", (int)imm16);
315
316
1.95k
  return (unsigned char) IAL_TYPE;
317
1.95k
      }
318
319
3.59k
  return (unsigned char) NIL;
320
5.54k
}
321
322
/* Process the branch instruction.  */
323
324
static unsigned char
325
dlx_br_type (struct disassemble_info* info)
326
3.59k
{
327
3.59k
  struct _br_opcode
328
3.59k
  {
329
3.59k
    unsigned long opcode;
330
3.59k
    char *name;
331
3.59k
  }
332
3.59k
  dlx_br_opcode[] =
333
3.59k
  {
334
3.59k
    { OPC(BEQOP), "beqz" }, /* Store byte.  */
335
3.59k
    { OPC(BNEOP), "bnez" }  /* Store halfword.  */
336
3.59k
  };
337
3.59k
  int dlx_br_opcode_num =
338
3.59k
    (sizeof dlx_br_opcode) / (sizeof dlx_br_opcode[0]);
339
3.59k
  int idx;
340
341
9.64k
  for (idx = 0 ; idx < dlx_br_opcode_num; idx++)
342
6.93k
    if (dlx_br_opcode[idx].opcode == opc)
343
890
      {
344
890
  if (imm16 & 0x00008000)
345
102
    imm16 |= 0xFFFF0000;
346
347
890
  imm16 += (current_insn_addr + 4);
348
890
  (*info->fprintf_func) (info->stream, "%s", dlx_br_opcode[idx].name);
349
890
  operand_deliminator (info, dlx_br_opcode[idx].name);
350
890
  (*info->fprintf_func) (info->stream, "r%d,", (int) rs1);
351
890
  (*info->fprintf_func) (info->stream, "0x%08x", (int) imm16);
352
353
890
  return (unsigned char) IBR_TYPE;
354
890
      }
355
356
2.70k
  return (unsigned char) NIL;
357
3.59k
}
358
359
/* Process the jump instruction.  */
360
361
static unsigned char
362
dlx_jmp_type (struct disassemble_info* info)
363
2.70k
{
364
2.70k
  struct _jmp_opcode
365
2.70k
  {
366
2.70k
    unsigned long opcode;
367
2.70k
    char *name;
368
2.70k
  }
369
2.70k
  dlx_jmp_opcode[] =
370
2.70k
  {
371
2.70k
    { OPC(JOP),         "j" },  /* Store byte.      */
372
2.70k
    { OPC(JALOP),     "jal" },  /* Store halfword.  */
373
2.70k
    { OPC(BREAKOP), "break" },  /* Store halfword.  */
374
2.70k
    { OPC(TRAPOP),   "trap" },  /* Store halfword.  */
375
2.70k
    { OPC(RFEOP),     "rfe" }   /* Store halfword.  */
376
2.70k
  };
377
2.70k
  int dlx_jmp_opcode_num =
378
2.70k
    (sizeof dlx_jmp_opcode) / (sizeof dlx_jmp_opcode[0]);
379
2.70k
  int idx;
380
381
14.4k
  for (idx = 0 ; idx < dlx_jmp_opcode_num; idx++)
382
12.1k
    if (dlx_jmp_opcode[idx].opcode == opc)
383
445
      {
384
445
  if (imm26 & 0x02000000)
385
157
    imm26 |= 0xFC000000;
386
387
445
  imm26 += (current_insn_addr + 4);
388
389
445
  (*info->fprintf_func) (info->stream, "%s", dlx_jmp_opcode[idx].name);
390
445
  operand_deliminator (info, dlx_jmp_opcode[idx].name);
391
445
  (*info->fprintf_func) (info->stream, "0x%08x", (int)imm26);
392
393
445
  return (unsigned char) IJ_TYPE;
394
445
      }
395
396
2.26k
  return (unsigned char) NIL;
397
2.70k
}
398
399
/* Process the jump register instruction.  */
400
401
static unsigned char
402
dlx_jr_type (struct disassemble_info* info)
403
2.26k
{
404
2.26k
  struct _jr_opcode
405
2.26k
  {
406
2.26k
    unsigned long opcode;
407
2.26k
    char *name;
408
2.26k
  }
409
2.26k
  dlx_jr_opcode[] =
410
2.26k
  {
411
2.26k
    { OPC(JROP),   "jr"    },  /* Store byte.  */
412
2.26k
    { OPC(JALROP), "jalr"  }   /* Store halfword.  */
413
2.26k
  };
414
2.26k
  int dlx_jr_opcode_num =
415
2.26k
    (sizeof dlx_jr_opcode) / (sizeof dlx_jr_opcode[0]);
416
2.26k
  int idx;
417
418
6.40k
  for (idx = 0 ; idx < dlx_jr_opcode_num; idx++)
419
4.47k
    if (dlx_jr_opcode[idx].opcode == opc)
420
327
      {
421
327
  (*info->fprintf_func) (info->stream, "%s", dlx_jr_opcode[idx].name);
422
327
  operand_deliminator (info, dlx_jr_opcode[idx].name);
423
327
  (*info->fprintf_func) (info->stream, "r%d", (int)rs1);
424
327
  return (unsigned char) IJR_TYPE;
425
327
      }
426
427
1.93k
  return (unsigned char) NIL;
428
2.26k
}
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
8.27k
{
437
8.27k
  bfd_byte buffer[4];
438
8.27k
  int insn_idx;
439
8.27k
  unsigned long insn_word;
440
8.27k
  dlx_insn dlx_insn_type[] =
441
8.27k
  {
442
8.27k
    dlx_r_type,
443
8.27k
    dlx_load_type,
444
8.27k
    dlx_store_type,
445
8.27k
    dlx_aluI_type,
446
8.27k
    dlx_br_type,
447
8.27k
    dlx_jmp_type,
448
8.27k
    dlx_jr_type,
449
8.27k
    (dlx_insn) NULL
450
8.27k
  };
451
8.27k
  int dlx_insn_type_num = ((sizeof dlx_insn_type) / (sizeof (dlx_insn))) - 1;
452
8.27k
  int status =
453
8.27k
    (*info->read_memory_func) (memaddr, (bfd_byte *) &buffer[0], 4, info);
454
455
8.27k
  if (status != 0)
456
30
    {
457
30
      (*info->memory_error_func) (status, memaddr, info);
458
30
      return -1;
459
30
    }
460
461
  /* Now decode the insn    */
462
8.24k
  insn_word = bfd_getb32 (buffer);
463
8.24k
  opc  = dlx_get_opcode (insn_word);
464
8.24k
  rs1  = dlx_get_rs1 (insn_word);
465
8.24k
  rs2  = dlx_get_rs2 (insn_word);
466
8.24k
  rd   = dlx_get_rdR (insn_word);
467
8.24k
  func = dlx_get_func (insn_word);
468
8.24k
  imm16= dlx_get_imm16 (insn_word);
469
8.24k
  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
8.24k
  current_insn_addr = (unsigned long) memaddr;
484
485
37.3k
  for (insn_idx = 0; dlx_insn_type[insn_idx] != 0x0; insn_idx++)
486
35.4k
    switch ((dlx_insn_type[insn_idx]) (info))
487
35.4k
      {
488
  /* Found the correct opcode   */
489
1.17k
      case R_TYPE:
490
2.17k
      case ILD_TYPE:
491
2.65k
      case IST_TYPE:
492
4.60k
      case IAL_TYPE:
493
5.49k
      case IBR_TYPE:
494
5.94k
      case IJ_TYPE:
495
6.27k
      case IJR_TYPE:
496
6.27k
  return 4;
497
498
  /* Wrong insn type check next one. */
499
0
      default:
500
29.1k
      case NIL:
501
29.1k
  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
34
      case R_ERROR:
506
34
  return -1;
507
35.4k
      }
508
509
1.93k
  if (insn_idx ==  dlx_insn_type_num)
510
    /* Well, does not recoganize this opcode.  */
511
1.93k
    (*info->fprintf_func) (info->stream, "<%s>", "Unrecognized Opcode");
512
513
1.93k
  return 4;
514
8.24k
}